gpt4 book ai didi

c++ - 错误 C2059 : syntax error : 'generic'

转载 作者:太空宇宙 更新时间:2023-11-04 13:12:38 27 4
gpt4 key购买 nike

当我想在我的代码中使用boost库时,我发现了一个错误:

error C2059: syntax error : 'generic'

这个错误来自 boost/filesystem/path.hpp,

path generic() const
{
...
}

而且我不知道如何解决它,我用谷歌搜索它,看起来我需要重新定义它。但我真的不知道该怎么做。

最佳答案

尝试在 Visual Studio 预处理器定义中设置:BOOST_FILESYSTEM_NO_DEPRECATED,如下图所示:

Preprocessor Definitions configuration page in Visual Studio

关于c++ - 错误 C2059 : syntax error : 'generic' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39112614/

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