如题。

解决方案 »

  1.   

    用专门的编辑查看工具就是了,比如UltraEditor或者SourceInsight之类。
      

  2.   

    例如,我把字符串"This is a test"存到二进制文件中,然后我想我二进制文件中的一对乱码还原为
    "This is a test"怎么做??
      

  3.   

    很容易实现,假如每次转换一个字节.
    CFile theSrcFile, theDstFile;
    theSrcFile.Open("d:\\aaa.exe",CFile::modeRead|CFile::typeBinary);
    theDstFile.Open("d:\\aaa.txt",CFile::modeWrite|CFile::typeBinary);
    BYTE pBuff;
    UINT Sent=0;
    UINT temp=0; 
    char theResult[4]={0}; //一个字节转化成 10 进制顶多为 255, 不会超过 3 位. 
    CString str="";
    while(Sent<theSrcFile.GetFileSize( ))
    {        temp=0;
    temp=theFile.Read(pBuff, 1);
    str.Format("%d", pBuff);
             memset(theResult,0,4);
             strcpy(theResult, str.operator lpcstr( ) )  //好像是这个成员涵数吧
             theDstFile.Write(theResult+" ", strlen(theResult+" "));
             Sent+=temp;}theSrcFile.Close(); theDstFile,Close();
    AfxMessageBox("文件转换完毕!",MB_OK+MB_ICONINFORMATION);