Difference Between C++ and C++ Standard

  • Context: C/C++ 
  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    C++ Standard
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
PainterGuy
Messages
938
Reaction score
73
hello everyone,:wink:

i was reading somewhere that there is C++ and C++ Standard. could some please tell me the main difference between two? and i also read something that some things such as "getch()" are non standard. can you guide me a bit on this? i will really appreciate this help of yours.

cheers
 
Physics news on Phys.org
As far as I know there are standards that relate to the grammar of the syntax and functionality of the language. I'm not sure if its an ISO or ANSI standard, but if you want to adhere to that standard then the compiler has to meet those certain requirements.

Also C++ comes with what is known as a standard template library and provided your compiler adheres to the right standard, the STL should work the same for every standard-meeting compiler.

The other standard library for C++ is the C++ standard library which has a lot of C++ specific things as well as inheriting the C standard library which has a tonne of functions that deal with things ranging from routines dealing with files to memory allocation and other common routines that do your basic standard OS type things.

I don't know what the getch() function refers to, but I'm guessing its some kind I/O function that gets a character from an I/O source.

I'm sorry I can't answer your question specifically, but if you want to see the C++ standard that has to be enforced for the various compilers out there, you should do yourself a favor and look up the ANSI and ISO standards for C++.
 
chiro said:
Also C++ comes with what is known as a standard template library and provided your compiler adheres to the right standard, the STL should work the same for every standard-meeting compiler.

The other standard library for C++ is the C++ standard library

Standard C++ is defined by a committee of the ISO. The current standard dates to 1998. It defines both the C++ language itself, and the C++ standard library. There is a draft for a new standard which will probably become official in the next year or two. Many of the features of the new standard are available in g++ (GNU C++) 4.6 which was released last week, and there's a thread here discussing some of those features.

The C++ standard library includes most or all of what was once called the "standard template library" (STL), which was designed before the first C++ standard appeared in 1998.

Individual compilers (Microsoft, GNU, etc.) often include non-standard "extensions" to C++. Some of them are anticipated features in the next standard. Others are intended for programming on specific platforms such as Windows.
 
many many thanks, chiro and jtbell. it helped me. and chiro you shouldn't be sorry because i was able to understand some stuff which could and it was useful. and that's what matter.

okay much grateful for this teaching. will ask any related questions here whenever i have some.

cheers