简体   繁体   中英

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 is an international language standard , formally entitled ISO/IEC 14882:2014(E). The nomenclature indicates that this is the version of the C++ language published by ISO in 2014.

C++ 5.1 does not exist . 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. However, this versioning system did not reach 5.1 by the time the language became standardised as ISO/IEC 14882:1998(E) in 1998.

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 .

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 .

C++14 is a version of the C++ standard. The standard specifies the types, syntax, semantics, etc that all C++ compilers must (try to) adhere to.

Dev-C++ 5.1 is a version of an IDE, of which there are many others. It uses GCC under the hood as the compiler. Depending on the GCC version, it may support different iterations of the C++ standard, which will affect which library features are available.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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