gpt4 book ai didi

windows - Visual C++ 无法找到 PVOID、DWORD、ULONG 等 "Windows types"

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

Windows 似乎找不到任何这些类型,我完全不知所措。我在 MSDN 上找到的东西似乎表明默认情况下包含它们,但它们在 native 程序或 CLR 程序中不起作用。

我遇到的具体错误是:

"<Project Name>.cpp(10): error C2065: 'PVOID' : undeclared identifier

"<Project Name>.cpp(10): error C2146: syntax error : missing ';' before identifier 'varname'

"<Project Name>.cpp(10): error C2065: 'varname' : undeclared identifier

如何让 Visual C++ 识别这些类型?

最佳答案

您需要包含 windows.h。在源文件的顶部添加这一行:

#include <windows.h>

关于windows - Visual C++ 无法找到 PVOID、DWORD、ULONG 等 "Windows types",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6943865/

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