使用XCode 7.0.1无法获得C ++ 14 [英] Can't get C++14 using XCode 7.0.1

查看:116
本文介绍了使用XCode 7.0.1无法获得C ++ 14的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在XCode 7.0.1中使用C ++ 14,但它不起作用.我正在尝试使用std :: string文字,但出现错误:

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.

既然应该使用C ++ 14,为什么会出现此错误?我尝试在XCode各处查找设置或其他内容,但找不到任何内容.我也尝试过在网上寻找答案,但是所有答案都与早期版本的XCode有关.

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.

这是一张照片: 错误消息

推荐答案

尝试在构建设置"中更改"C ++语言方言"设置.现在,它可能设置为C ++ 11,但应该更改为C ++ 14.

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.

应该是:

这篇关于使用XCode 7.0.1无法获得C ++ 14的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆