学习CB读写文件

int i = FileOpen("C://NewWork//res.dxf",0);
int filesize=FileSeek(i,0,2);
FileSeek(i,0,0);
char* str = new char[filesize];
FileRead(i,str,filesize);
ShowMessage(filesize);
String test = StrPas(str);
delete str;
ShowMessage(test);
int createI = FileCreate("C://NewWork//tt.dxf");

FileWrite(createI,test.c_str(),filesize);
FileClose(createI);
FileClose(i);

你可能感兴趣的:(学习CB读写文件)