您的位置:首页 > 编程语言 > C语言/C++

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

2017-03-05 22:11 295 查看
转载自: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。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  C++
相关文章推荐