gpt4 book ai didi

c++ - VS2008 : Disable warnings in included header files outside the project

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:56:24 25 4
gpt4 key购买 nike

这可能吗?我不想全局禁用警告,因为我想检查我自己的头文件是否有警告。

最佳答案

您可以禁用有关包含外部头文件的警告:

#pragma warning( push )
#pragma warning( disable: the warning)
// include here
#pragma warning( pop )

如果您需要多次包含标题,您可以使用编译指示创建一个标题并将其包含在内。问了同样的问题here .

关于c++ - VS2008 : Disable warnings in included header files outside the project,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8716322/

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