首页 > 学院 > 开发设计 > 正文

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

2019-11-06 06:59:41
字体:
来源:转载
供稿:网友


这样就没问题:

#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。


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表