#include <windows.h> 为什么不能放在 #include <tlhelp32.h> 后面

来源:互联网 发布:php实现sql防注入 编辑:程序博客网 时间:2024/04/27 14:18

转载自:http://www.myexception.cn/vc-mfc/722651.html


这样就没问题:

#include <windows.h>#include <TLHELP32.H>#include <iostream>using namespace std;

这样就报错:

#include <TLHELP32.H>#include <windows.h>#include <iostream>using namespace std;//error C2146: syntax error : missing ';' before identifier 'WINAPI'//error C2501: 'HANDLE' : missing storage-class or type specifiers//fatal error C1004: unexpected end of file found

——解决方案——
因为TLHELP32.H中的一些宏定义是在windows.h中的,所以先包含windows.h。

0 0
原创粉丝点击