gpt4 book ai didi

c++ - 错误 C2065 : 'DWORD_PTR' : undeclared identifier

转载 作者:可可西里 更新时间:2023-11-01 11:39:34 26 4
gpt4 key购买 nike

编译时

#include "windows.h"
#include "stdafx.h"
#include "resource.h"
#include "ProgressDlg.h"
....
...
rItem.lParam = (LPARAM)(DWORD_PTR) m_lsStatusMessages.back().c_str();

I am getting the error C2065: 'DWORD_PTR' : undeclared identifier

我是否遗漏了任何包含内容。

最佳答案

#include "windows.h"
#include "stdafx.h"

假设您实际使用 MSVC 中的预编译 header 支持,这就是您的问题。您(尝试)在 stdafx.h 之前包含 windows.h之前 #include "stdafx.h" 的每一行代码都将被忽略。 IIRC MSVC 在某些版本中也给出了一些警告。

#include "windows.h" 放入stdafx.h 或将其移到#include "stdafx.h" 下方。

关于c++ - 错误 C2065 : 'DWORD_PTR' : undeclared identifier,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3778090/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com