0

Possible Duplicate:
Where do I find the current C or C++ standard documents?

After reading several websites and books, I notice there is a constant reference to a C++ standard. While reading posts on stackoverflow and c++ forums, the communities encourage following this standard. This encouraged me to Google c++ standard to find out in more detail about the language. Is the standard a book? a published document? a mystic spirit that speaks through some seemingly crazed medium? Is there a single source and a final version that people refer to for verification? Several sites and books claim to be based off the standard, but this is not the same as the standard.

So far, I have found recommendations to look at the ISO standard (which seems to be mostly incomplete drafts) and the GNU c++ documentation at http://gcc.gnu.org/onlinedocs/libstdc++/. I have briefly used these to try to answer some of the questions that come to mind, but I want to make sure these are the proper references to use when answering questions (my own or others) and that I do so according to the proper standard and not something based on the standard (there is a difference).

Just to note: For me, 99% of all my programming will be done in a Linux environment so there may (or may not be) a different standard for different operating systems

Community
  • 1
  • 1
  • There is a single C++ standard (well, actually there is a C++98, a C++03 and a C++11 one). You have to pay to get them, but you can find the drafts available online. – K-ballo May 27 '12 at 20:28

2 Answers2

0

There is a single version of standard. There is no difference between systems( it is one standard). You have to pay go get full version of the standard ( even for PDF file). Everyone is using:

https://github.com/cplusplus/draft [EDITED TO THE NEWEST VERSION]

for free, because it is draft version and it is free. There are some different between draft and released one.

CyberGuy
  • 2,783
  • 1
  • 21
  • 31
  • There are **much** more recent drafts available online. http://stackoverflow.com/questions/81656/where-do-i-find-the-current-c-or-c-standard-documents – Mat May 27 '12 at 20:34
  • The more recent draft (more recent than the released standard, in fact) is [on GitHub](https://github.com/cplusplus/draft). It contains trivial corrections and clarifications from the WG21 meeting in February. – Kerrek SB May 27 '12 at 20:35
0

If you want to get a copy of the standard, you can buy it for a small fee from ISO, which is how they fund themselves.

However, if you simply follow the last draft of C++11, which is currently the latest C++ standard, and will remain to be for some time, you will never notice a difference against the released standard.

It is a similar story with POSIX, a standard used for UNIX-like APIs on that family of operating systems. In that case you would want to go here.

However, while a perfect understanding of C++ is highly desirable whatever you do, it may well be that your portability needs will make POSIX somewhat irrelevant to you; either you might only need Linux compatibility, or you might restrict yourself to APIs (such as the standard C++ library or other portable libraries) that will support you even on non-POSIX operating systems.

Jirka Hanika
  • 13,301
  • 3
  • 46
  • 75
  • The latest draft will depart more and more from the current standard until the new standard is release. – CB Bailey May 27 '12 at 20:55
  • The link I supplied is not going to change. Neither will C++11 if designated this way. – Jirka Hanika May 27 '12 at 21:00
  • So what did you mean by the phrase "follow the latest draft"? – CB Bailey May 27 '12 at 21:16
  • Latest C++11 draft. I consider it a perfect practical advice for the next several years. Anyone who has an expert knowledge of C++11 right now is ahead of his compiler in compliance. (`gcc` in particular is already very compliant, so no need to worry.) – Jirka Hanika May 27 '12 at 21:24
  • 1
    Referring to one particular document is very different from "following the latest". If that is what you meant, I didn't understand it from the text of your answer. – CB Bailey May 27 '12 at 21:34