包括 <Windows.h> 原因(未知属性“no_init_all”)错误

The*_*ser 6 c++ header visual-studio-2017

标题说明了一切,在 VS2017 中开始了一个新项目,包括<iostream>,然后当我去包括时<Windows.h>(顺便说一下,这是我第一次尝试使用此标题),我收到错误消息:unknown attribute"no_init_all" 知道是什么原因造成的吗?

Nic*_*ate 5

好的,将这些评论放入答案中......

此错误已在VS 2019 中修复,但根据此答案,在 VS 2017 中您可以使用:

#define no_init_all deprecated
Run Code Online (Sandbox Code Playgroud)

甚至只是:

#define no_init_all
Run Code Online (Sandbox Code Playgroud)