我有這個C++程序,並由於某種原因它不會編譯。我在VS 2005中使用XP。C++錯誤typedef不能超載
#include "stdafx.h"
#include "MainThread.h"
HANDLE hStopEvent = NULL;
int main(int argc, char *argv[])
{
return 0;
}
error C2146: syntax error : missing ';' before identifier 'hStopEvent'
error C2377: 'HANDLE' : redefinition; typedef cannot be overloaded with any other symbol
see declaration of 'HANDLE'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
問題將出現在您的標題中。 – JasonD