Difference Between C++ and C++ Standard

  • Context: C/C++ 
  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    C++ Standard
Click For Summary

Discussion Overview

The discussion revolves around the differences between C++ and the C++ Standard, including the implications of adhering to standards in programming and the nature of certain functions like "getch()". The scope includes technical explanations and conceptual clarifications related to programming standards and libraries.

Discussion Character

  • Technical explanation, Conceptual clarification

Main Points Raised

  • Some participants note that there are standards related to the syntax and functionality of C++, possibly referring to ISO or ANSI standards, which compilers must adhere to.
  • It is mentioned that C++ includes a standard template library (STL) and a C++ standard library, which should function consistently across compliant compilers.
  • One participant states that the current C++ standard dates back to 1998 and defines both the language and the standard library, with a new draft expected to be finalized soon.
  • There is a mention of non-standard extensions provided by individual compilers, which may include anticipated features or platform-specific functionalities.
  • A participant expresses uncertainty about the "getch()" function, suggesting it might be an I/O function but does not provide a definitive explanation.

Areas of Agreement / Disagreement

Participants generally agree on the existence of standards for C++ and the role of libraries, but there is uncertainty regarding specific functions like "getch()" and the implications of non-standard extensions.

Contextual Notes

Some assumptions about the definitions of standards and the specific functionalities of certain functions remain unresolved, as do the details regarding the non-standard extensions provided by different compilers.

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
 
Technology 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
 

Similar threads

Replies
86
Views
3K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 23 ·
Replies
23
Views
3K
  • · Replies 17 ·
Replies
17
Views
4K
Replies
5
Views
8K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 17 ·
Replies
17
Views
2K
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
10K