主题:快来救命啊!!!help
int psFile;
int psDestFile;
char *destStr;
psFile=open(fileName,O_RDONLY);
//psFile=open(fileName,0);
if(psFile==-1){
psFile=0;
return 2;
}
1 、在这之前是对的fileSize有时对,有时候不对,是零。
long fileSize= filelength(psFile) + 1;
char *buf=new char[fileSize];
read(psFile,buf,fileSize);
AnsiString ansistr=Utf8ToAnsi((UTF8String)buf);
2、为什么ansistr有时候可以得到值,有时候得不到阿?那位大哥知道,请赐教!
谢谢!十万火急!
int psDestFile;
char *destStr;
psFile=open(fileName,O_RDONLY);
//psFile=open(fileName,0);
if(psFile==-1){
psFile=0;
return 2;
}
1 、在这之前是对的fileSize有时对,有时候不对,是零。
long fileSize= filelength(psFile) + 1;
char *buf=new char[fileSize];
read(psFile,buf,fileSize);
AnsiString ansistr=Utf8ToAnsi((UTF8String)buf);
2、为什么ansistr有时候可以得到值,有时候得不到阿?那位大哥知道,请赐教!
谢谢!十万火急!