我的代码:
'BOOL' CNetworkLibrary::CheckEdit(); // Anti Edit
{
bool m_Debugger = false;
CCRC32 MyCRC32;
MyCRC32.Initialize();
static const int counter = 0;
const char* filesChecker[] = {"Data/Character/Mage/ma.ba","Data/Character/Healer/hw.ba","Data/Character/Knight/ni.ba","Data/Character/NightShadow/ns.ba","Data/Character/Rogue/ro.ba","Data/Character/Sorcerer/so.ba","Data/Character/Sorcerer/sot1.ba","Data/Character/Sorcerer/sot2.ba","Data/Character/Titan/ti.ba"};
unsigned long filesAllowed[] = {1879963772,2208387853,4192873381,2001348244,2318569090,2966284884,2609689976,992199620,2304717972};
int sizeofFiles = sizeof(filesChecker) / sizeof(filesChecker[0]);
if ( !m_Debugger ) {
for(int i=0;i<sizeofFiles;i++) {
if ( MyCRC32.FileCRC(filesChecker[i]) != filesAllowed[i] ) {
MessageBox(NULL,"Please use legal Gamefiles!", "Antihack",IDOK);
exit(0);
return true;
}
}
}
else
{
std::ofstream file("Setting.txt");
for(int i=0; i<sizeofFiles; i++) {
file << MyCRC32.FileCRC(filesChecker[i]);
if ( i != (sizeofFiles-1) ) file << ":";
}
file.close();
}
return false;
}
错误:
error C2059: syntax error : 'constant' & error C2447: '{' : missing function header (old-style formal list?)