#include <windows.h> 为什么不能放在 #include <tlhelp32.h> 后面
2017-03-05 22:11
295 查看
转载自:http://www.myexception.cn/vc-mfc/722651.html
这样就没问题:
这样就报错:
——解决方案——
因为TLHELP32.H中的一些宏定义是在windows.h中的,所以先包含windows.h。
这样就没问题:
#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++程序时预编译头只能是#include<iostream>而不能是#include<iosteam.h>
- 为什么使用百度编辑器时 前台代码不能放在 class<table >中 如果放进去的话,会发生 百度编辑的内容显示不出来
- C51移位运算符<<,>>后面只能是常量,不能是变量
- STL中array<>内部为什么不能交换指针呢
- 多角度分析为什么 Linux 的硬连接不能指向目录<转>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- 解决error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- 为什么不能直接通过document.getElementById("<%= txtCard.ClientID %>")
- <细节>为什么构造函数不能是虚函数,为什么有虚析构函数
- VS2010 #include<iostream> // 不能打开iostream
- #error WINDOWS.H already included. MFC apps must not #include <windows.h>
- vs2008 为什么不包含#include<cstring>程序也可以通过。
- error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- linux标准库#include <unistd.h>与windows的#include <windows.h>(C语言开发)
- 加上#include<windows.h>后出现的奇葩错误
- WINDOWS.H already included. MFC apps must not #include <windows.h>
- #error WINDOWS.H already included. MFC apps must not #include <windows.h>
- error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
- fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>