尝试使用MINGW编译此c ++代码
#include <stdio.h>
int main ()
{
FILE * pFile;
char file_name[100] = "test";
pFile = fopen (file_name,"rb");
fseeko64(pFile, 0, SEEK_END);
long long file_dim = ftello64 (pFile);
printf ("File:\n%s\ncontains %I64d bytes:\n", file_name, file_dim);
return 0;
}
总是得到
'fseeko64' was not declared in this scope
'ftello64' was not declared in this scope
为什么呢?怎么了?
更新:
我找到了理由:“ - std = c ++ 11”开关给出了这个! “-std = gnu ++ 11”确定