1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(30) : error C2146: 語法錯誤 : 缺少“;”(在標識符“WINAPI”的前面)
1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(30) : error C4430: 缺少類型說明符 - 假定爲 int。注意: C++ 不支持默認 int
1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(30) : error C2146: 語法錯誤 : 缺少“;”(在標識符“CreateToolhelp32Snapshot”的前面)
1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(30) : error C4430: 缺少類型說明符 - 假定爲 int。注意: C++ 不支持默認 int
1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(31) : error C2065: “DWORD”: 未聲明的標識符
1>c:\program files\microsoft sdks\windows\v6.0a\include\tlhelp32.h(223) : fatal error C1003: 錯誤計數超過 100;正在停止編譯
後來發現是頭文件的位置有問題
錯誤的時候是這樣:
#include <stdio.h>
#include <tlhelp32.h>
#include <windows.h>
改正後,正確運行:
#include <stdio.h>
#include <windows.h>
#include <tlhelp32.h>