错误 C2371"DWORD":重新定义;不同的基本类型
Error C2371 'DWORD': redefinition; different basic types
我得到这个错误" error C2371 'DWORD': redefinition;不同的基本类型",同时在Visual Studio 2015上使用MFC编译Visual c++代码。当我双击错误时,它带我到stint .h第23行:
typedef unsigned int uint32_t;
如果我在我的代码中发现了DWORD并按下f12它会带我到minwindefine。h第156行:
typedef unsigned long DWORD;
我没有显式地包含这些文件中的任何一个,所以我不知道这些文件是按什么顺序包含的。我完全迷失在这里做什么来修复这个错误。有人知道吗?
我发现了错误,它是在一个3rdpartyapi.h:
#ifndef uint32_t
# define uint32_t DWORD
#endif
我所做的只是把#include <cstdint>
放在#ifndef
之前,错误就消失了。谢谢大家的帮助。
相关文章:
- ArduinoJson 6.15.2:JsonObject没有命名类型
- 防止主数据类型C++的隐式转换
- 大量序列中核苷酸类型的快速计数
- 如何从C++中的依赖类型中获得它所依赖的类型
- 有关插入适配器的错误。[错误]请求从 'back_insert_iterator<vector<>>' 类型转换为非标量类型
- 是否可以初始化不可复制类型的成员变量(或基类)
- 如何获取std::result_of函数的返回类型
- 从父命名空间重载类型
- 如果C++类在类方法中具有动态分配,但没有构造函数/析构函数或任何非静态成员,那么它仍然是POD类型吗
- 非法,左操作数具有类型 'DWORD [29]'
- 是否可以将 Dword 转换为类型名称
- 分析位图文件时,如何替换WORD和DWORD数据类型
- 如何将DWORD或char*类型的变量转换为LPCWSTR
- 如何将双精度类型转换为 DWORDLONG 或 DWORD 转换为 DWORDLONG 或 DWORD_PTR 转换为
- 为什么在运行时将字符串类型转换为DWORD时会得到不同的值?
- vc++中的DWORD数据类型及其在Java中的转换
- 类中的创建线程错误:类型'DWORD (windows_thread::)(void*)'的参数与"DWORD (*)(void*)"不匹配?
- 错误 C2371"DWORD":重新定义;不同的基本类型
- 为什么需要类型铸件(UINT)(void*)(DWORD)
- 在LPVOID返回时DWORD的类型强制转换是什么?