简体   繁体   English

Ideone中的C ++ 14和C ++ 5.1有什么区别?

[英]What is the difference between C++ 14 and C++ 5.1 in Ideone?

I get to choose an option while I do competitive programming. 在进行竞争性编程时,我可以选择一个选项。 I have tried both and most of the times I prefer C++ 14. Does choosing the other one make any difference in an answer or a compilation? 我已经尝试了两种方式,而且大多数时候我更喜欢C ++ 14.选择另一种方式会对答案或编译产生任何影响吗?

C++14 is an international language standard , formally entitled ISO/IEC 14882:2014(E). C ++ 14是一种国际语言标准 ,正式名称为ISO / IEC 14882:2014(E)。 The nomenclature indicates that this is the version of the C++ language published by ISO in 2014. 命名表明这是ISO在2014年发布的C ++语言的版本。

C++ 5.1 does not exist . C ++ 5.1不存在 In the 1980s there were versions of pre-standard "C++" that Bjarne Stroustrup created for fun, variously called C++ 1.0 and C++ 2.0. 在20世纪80年代,Bjarne Stroustrup为了好玩而创建了预标准“C ++”的版本,各种称为C ++ 1.0和C ++ 2.0。 However, this versioning system did not reach 5.1 by the time the language became standardised as ISO/IEC 14882:1998(E) in 1998. 然而,当语言在1998年被标准化为ISO / IEC 14882:1998(E)时,该版本控制系统没有达到5.1。

It is possible that you are instead referring to the version number of some Integrated Development Environment (a piece of software for your computer, consisting of a text editor and wrapping a compiler/debugger). 您可能会参考某些集成开发环境(一种用于您的计算机的软件,包括文本编辑器和包装编译器/调试器)的版本号。 For example, you could be talking about version 5.1.0.0 of the IDE fork known as "Orwell Dev-C++", which dates back to 2011 . 例如,您可能正在谈论称为“Orwell Dev-C ++”的IDE分支的版本5.1.0.0, 其可以追溯到2011年

On the other hand, if these are options presented to you as languages in some online tool, the tool is wrong . 另一方面,如果这些是在某些在线工具中作为语言呈现给您的选项,则该工具是错误的 For example, ideone.com offers "c++ 5.1" which is, apparently, GCC 5.1 in C++98 mode . 例如, ideone.com提供“c ++ 5.1”,显然是C ++ 98模式下的GCC 5.1

C++14 is a version of the C++ standard. C ++ 14是C ++标准的一个版本。 The standard specifies the types, syntax, semantics, etc that all C++ compilers must (try to) adhere to. 该标准指定了所有C ++编译器必须(尝试)遵守的类型,语法,语义等。

Dev-C++ 5.1 is a version of an IDE, of which there are many others. Dev-C ++ 5.1是IDE的一个版本,其中还有许多其他版本。 It uses GCC under the hood as the compiler. 它使用GCC作为编译器。 Depending on the GCC version, it may support different iterations of the C++ standard, which will affect which library features are available. 根据GCC版本,它可能支持C ++标准的不同迭代,这将影响可用的库功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM