3

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

I have several C books, and one of them, C by Discovery, explains the language very well. But so far I don't seem to have been able to find the full C/C++ language and library standards and lists of functions, types, etc., in whole detail.

Where is exactly a full standard for C99 and also the older, supposedly more commonly used and accepted, C language standards, the C++ language standards, and their libraries?

Is there some of them I must pay for, or should I just follow what Wikipedia and documentation like that of GCC cite?

Where else should I go to download or get them fully?

Community
  • 1
  • 1
alt.126
  • 1,097
  • 1
  • 9
  • 22
  • Is this what you are looking for: www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf? – yasouser Mar 29 '11 at 02:31
  • Duplicate of [Where do I find the current C or C++ standard documents?](http://stackoverflow.com/questions/81656/where-do-i-find-the-current-c-or-c-standard-documents) – James McNellis Mar 29 '11 at 02:59
  • @yasouser It might be useful for C++. I will review it with actual programming proofs. Thanks. – alt.126 Mar 30 '11 at 14:57

3 Answers3

5

The Wikipedia article C99 has a link at the bottom to a draft of the C99 language specification. It is a draft because the final published version you have to pay for. But the draft is basically accurate, so it's a good reference. This is an extremely long specification of the entire language including the library, but possibly not what you are after. To just see the standard library, simply consult the man pages. Consult the Wikipedia article C standard library for a list and summary of the various functions.

For C++, the same deal. The Wikipedia article C++ has links to various drafts of the complete specification, notably the most recent draft of C++ from 2010 (the old C++, before C++0x comes into effect). The Wikipedia article C++0x has similar links to drafts of the soon-to-be-named C++ 2011 standard. But if you are just looking for a reference on the standard library, you can't go past cplusplus.com's reference section, which includes full documentation for the C library (in C++ mode), the IO library, and the STL (containers and other misc utilities). That's what I use as a day-to-day library reference.

mgiuca
  • 20,958
  • 7
  • 54
  • 70
  • Yes, the entire specification is what I'm looking for (I need sort of a full C/C++ API reference and the language/library intricacies for several purpuses). However, I wouldn't ignore any other references for testing the concepts of the standards. Thanks for the references. – alt.126 Mar 30 '11 at 15:04
1

The best online copy of C99 I've found is here:

http://busybox.net/~landley/c99-draft.html

R.. GitHub STOP HELPING ICE
  • 208,859
  • 35
  • 376
  • 711
  • Looks like a well enough reference to start working in the meantime. Most certainly is basically complete. – alt.126 Mar 30 '11 at 15:11
0

If you want the actual standard, I don't think you can just download it. I believe you have to buy a copy from the American National Standards Institute. The GCC documents don't provide all the detail you need for the base language that GCC extended.

Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
  • 3
    Sort of -- you have to buy a copy of the final published standard, but you can always find unpublished drafts which are so close it doesn't really matter (unless you are implementing a full compiler -- most of us just want to know language details). See my answer for links. – mgiuca Mar 29 '11 at 02:36
  • What part of "if you want the actual standard" wasn't clear? If you don't want the precise langauge details you can read the draft. Just don't play language lawyer from it. – Ira Baxter Mar 29 '11 at 02:37
  • Your answer implies that there is the "actual standard", and if you don't have it, there's the GCC documents. What wasn't clear is that there is a near-complete 1325-page draft of the "actual standard" available for free. – mgiuca Mar 29 '11 at 02:39
  • I aaid the GCC documents weren't adequate either. – Ira Baxter Mar 29 '11 at 02:44
  • 1
    Yes, and you were right on both counts. My comment was merely adding the vital information which actually answers the question -- the specs are, for all intents and purposes, available for free. – mgiuca Mar 29 '11 at 02:47