试着用 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”好