Can't get C++14 using XCode 7.0.1

☆樱花仙子☆ 提交于 2019-12-22 08:27:57

问题


I'm trying to use C++14 in XCode 7.0.1 and it's not working. I'm trying to use a std::string literal and I'm getting the error:

Invalid suffix on literal; C++11 requires a space between literal and identifier.

Since this is supposed to use C++14 why am I getting this error? I tried looking all around XCode for a setting or something but I can't find anything. I also tried looking online for answers but all the answers relate to earlier versions of XCode.

Here's a pic: Error Message


回答1:


Try changing the "C++ Language Dialect" setting in your Build Settings. Right now it is probably set at C++11 but should be changed to C++14.

Should be:



来源:https://stackoverflow.com/questions/33358313/cant-get-c14-using-xcode-7-0-1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!