求助:如何将.exe转成16进制数字
  • 板块灌水区
  • 楼主louie2011
  • 当前回复2
  • 已保存回复2
  • 发布时间2025/1/20 11:39
  • 上次更新2025/1/20 14:27:29
查看原帖
求助:如何将.exe转成16进制数字
941801
louie2011楼主2025/1/20 11:39
  1. 如何将.exe转成16进制数字(0~F)
  2. 如何在转换过程中识别到文件末尾

已知以下程序转化过程中会意外停止(hello.exe是hello world的exe)

#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("hello.exe","r",stdin);
	freopen("hello.out.txt","w",stdout);
	char c;
    while(c!=EOF){
  	    c=getchar();
        printf("%02x",c);
    }
    return 0;
}

如何使该程序正确判断文件末尾?

如何将16进制转换回去?

2025/1/20 11:39
加载中...