C/C++ Difference Between C++ and C++ Standard

  • Thread starter Thread starter PainterGuy
  • Start date Start date
  • Tags Tags
    C++ Standard
AI Thread Summary
The discussion clarifies the distinction between C++ and the C++ Standard, which is defined by the ISO and encompasses both the language and its standard library. The current standard dates back to 1998, with a new draft expected to be finalized soon. Adherence to these standards ensures that compilers, like those from Microsoft and GNU, provide consistent functionality, including the standard template library (STL) and the C++ standard library, which incorporates elements from the C standard library. The conversation also touches on non-standard functions like "getch()", which are specific to certain compilers and platforms, highlighting the importance of consulting the ANSI and ISO standards for accurate information on C++ compliance. Overall, understanding these standards is crucial for effective C++ programming.
PainterGuy
Messages
938
Reaction score
72
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
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top