Difference Between C++ and C++ Standard

In summary: There are two types of C++, C++ Standard and C++ Standard Library. The main difference between the two is that the C++ Standard Library includes a lot of functions and standards that are specific to C++. For example, the getch() function is not part of the C++ Standard Library, but is a function that is specific to the I/O library.
  • #1
PainterGuy
940
69
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
  • #2
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++.
 
  • #3
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.
 
  • #4
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
 
  • #5


Hello there! I can provide some insight into the difference between C++ and C++ Standard. C++ is a programming language that was developed in the late 1970s and is still widely used today. It is a high-level, general-purpose language that is commonly used for developing applications, operating systems, and other software.

C++ Standard, on the other hand, refers to the official standard for the C++ language, which is maintained by the International Organization for Standardization (ISO). This standard specifies the rules and guidelines for writing C++ code, ensuring that code written in this language is consistent and can be easily understood by other developers.

One of the main differences between C++ and C++ Standard is that C++ is a language, while C++ Standard is a set of rules and guidelines for using that language. This means that C++ Standard is constantly evolving and being updated, while C++ remains the core language.

In terms of the "getch()" function, it is a non-standard function that is commonly used in older versions of C++. This function is not part of the official C++ Standard, but it is still supported by many compilers. However, it is recommended to use alternative functions that are part of the C++ Standard, such as "cin" for input and "cout" for output.

I hope this clarifies the difference between C++ and C++ Standard for you. If you have any further questions, please don't hesitate to ask. Happy coding!
 

What is the difference between C++ and C++ Standard?

The term C++ refers to the programming language developed by Bjarne Stroustrup in 1983. It is an extension of the C programming language with additional features such as object-oriented programming and templates. The C++ Standard, also known as ISO/IEC 14882, is a set of rules and guidelines that define the syntax and semantics of the C++ language, ensuring compatibility and portability among different compilers.

Which features are unique to C++ Standard compared to C++?

The C++ Standard introduces new features such as namespaces, exceptions, and the standard template library (STL). These features were not present in the original C++ language and were added to improve the functionality and efficiency of the language.

Is C++ Standard backward compatible with C++?

Yes, the C++ Standard is designed to be backward compatible with the C++ language. This means that all valid C++ programs should also be valid according to the C++ Standard. However, some features from older versions of C++ may be deprecated or removed in the latest version of the Standard.

What is the purpose of having a C++ Standard?

The C++ Standard provides a common set of rules and guidelines for the C++ language, ensuring that programs written in C++ can be compiled and executed on different systems and platforms. It also promotes code portability and makes it easier for programmers to maintain and update their code.

How often does the C++ Standard get updated?

The C++ Standard is updated every few years, with the latest version being C++17 released in 2017. The C++ Standards Committee, comprised of language experts and representatives from different companies, meets regularly to discuss and propose updates to the Standard based on the evolving needs of the programming community.

Similar threads

  • Programming and Computer Science
Replies
8
Views
2K
  • Programming and Computer Science
Replies
23
Views
2K
Replies
9
Views
1K
  • Programming and Computer Science
Replies
17
Views
1K
  • Calculus and Beyond Homework Help
2
Replies
58
Views
3K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
9
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
163
  • Programming and Computer Science
Replies
1
Views
619
  • Programming and Computer Science
Replies
5
Views
5K
Back
Top