64,654
社区成员
发帖
与我相关
我的任务
分享
HFILE hFile;
CString strPath="D:\\123.txt";
hFile=_lopen(strPath,OF_READWRITE);
if(hFile==HFILE_ERROR)
{
hFile=_lcreat(strPath,0);
if(hFile==HFILE_ERROR)
{
_lclose(hFile);
MessageBox("create the file error","file error");
}
}
_llseek(hFile,0,FILE_BEGIN);
// char lpBuffer[20]="0XB10X01FMG";
const BYTE a=0XB1;
_lwrite(hFile,(char*)a,sizeof(a));
// _lwrite(hFile,lpBuffer,20);
_lclose(hFile);
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream fout;
fout.open("a.txt");
fout<<"0x"<<hex<<0x19<<endl;
fout.close();
}