• Advertisement
Sign in to follow this  

latest standard of C and C++

This topic is 4249 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

What is the latest standard on C and C++? Where can I get a copy of the official standards? [ok, www.iso.org, anywhere else?] What compilers support these standards? What are the earlyer standards and what compilers support them? What books describe/teach these standards precisely? Please recommend only books you compared to other books, because the people that read only one book always say that it's good. Thx!

Share this post


Link to post
Share on other sites
Advertisement
You will find the standard here, as a PDF i believe.

If you get the latest compiler out of whichever series you won't have to worry about any of that. The best way of learning IMO is o just get a compiler and start writing, looking up what you need as you go.

Dave

Share this post


Link to post
Share on other sites
The latest version of the C++ standard is ISO/IEC 14882:2003. It can be purchased from ISO or your national standards body (such as ANSI for the US). It can also be purchased in hard cover from Wiley.

The latest version of the C standard is ISO/IEC 9899:1999. Again it can be purchase from ISO or your national standard body. It too can be purchased in hard cover from Wiley.

Share this post


Link to post
Share on other sites
Depends on what you mean by uses. MSVC 2005 probably implements about 99.9% of ISO/IEC 14882:2003, but still isn't fully compliant. For example: the infamous export keyword is not supported by MSVC 2005. MSVC 2005 also doesn't even pay lip service to ISE/IEC 9899:1999. Almost every new feature introduced in that version of the standard is ignored by MSVC 2005, though it does implement the previous version of the standard pretty well.

Share this post


Link to post
Share on other sites
Not that I know of.

But here are some missing features:
http://www.codeproject.com/cpp/stdexceptionspec.asp
http://www.codeproject.com/cpp/stdexport.asp
http://www.codeproject.com/cpp/TwoPhaseLookup.asp

Share this post


Link to post
Share on other sites
If you buy the standard online as a pdf be careful which version you get. It's available as an electronic download for about $19.99 if you get the right one but there are places selling it for much much more so look around. I think you can get it for a sensible price from ANSI, I forget where I downloaded my copy from now but I know I saw some outrageous prices while I was looking for it.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Depends on what you mean by uses. MSVC 2005 probably implements about 99.9% of ISO/IEC 14882:2003, but still isn't fully compliant. For example: the infamous export keyword is not supported by MSVC 2005.

Lets be fair though, unless things have changed recently no major compiler actually implements the export keyword, let alone correctly.

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
Lets be fair though, unless things have changed recently no major compiler actually implements the export keyword, let alone correctly.


Comeau has, for quite a while.

Share this post


Link to post
Share on other sites
Im just curious as Ive seen this coming up a lot recently...

For those that have purchased the standard books, do you actually think it was worth it? Or will you find most of it in regular reference books on the market (and not all necessarily in one book) right now?

I know enough now that I rather purchase reference books for any language that I need to learn or use often rather than an intro/beginner book so I was just wondering how the official standard books compare to some commercial reference books.

Share this post


Link to post
Share on other sites
I don't refer to the standard that often but when I've needed to it's invaluable, after all it is by definition the definitive reference [grin]

Sometimes you come across some slightly obscure issue that you can't find agreement on and then the letter of the standard is the only way to resolve the question. It's not something you're going to need on a day to day basis though and it's certainly not what I'd recommend as a first resource for someone learning the language.

Share this post


Link to post
Share on other sites
Quote:
Original post by OrangyTang
Lets be fair though, unless things have changed recently no major compiler actually implements the export keyword, let alone correctly.


Well, there's a reason why I called it infamous. But it also depends on what you call a major compiler. In addition to Comeau, last time I checked, Intel's C++ Compiler supported export (which makes sense as I believe it uses an EDG front end).

Share this post


Link to post
Share on other sites
MSVC++ 2005 ignoring exception specifications is, arguably, a very good thing.

Come on now; Herb Sutter is on the MSVC++ team. You've read his books. That compiler is in good hands standards-wise.

Share this post


Link to post
Share on other sites
Quote:
Original post by Dave
You will find the standard here, as a PDF i believe.


Actually, you won't. The free PDFs there do not include the standard. They include drafts leading up to the standard but not the standard itself. Legally, those must be purchased from the appropriate standards bodies. When I purchased it a couple of years ago 14882:2003 was only $18 - very well worth the investment.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Quote:
Original post by OrangyTang
Lets be fair though, unless things have changed recently no major compiler actually implements the export keyword, let alone correctly.


Well, there's a reason why I called it infamous. But it also depends on what you call a major compiler. In addition to Comeau, last time I checked, Intel's C++ Compiler supported export (which makes sense as I believe it uses an EDG front end).


Yeah, thats why I wrote 'major' instead of 'all'. I'd be surprised if you found even 1% of gamedev members using it. Good to hear the Intel one supporting it too though. [grin]

Share this post


Link to post
Share on other sites
Bah. Intel writes some good compilers.

Having at least 1 liscence for it and seeing if it can make your code compiler to a faster executable is worthwhile. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by kickkick
Any book on the subject?


Books on what subject?

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Quote:
Original post by kickkick
Any book on the subject?


Books on what subject?


Read my first post. It's what this thread is all about.

Share this post


Link to post
Share on other sites
Quote:
Original post by kickkick
Quote:
Original post by SiCrane
Quote:
Original post by kickkick
Any book on the subject?

Books on what subject?

Read my first post. It's what this thread is all about.

Read the whole thread. Books don't teach the standard; they teach the language. Good books teach up-to-date implementations of the language standard.

A highly recommended book is Accelerated C++. Personally, it's been years since I read a language instruction book for C++; most of my reading deals with software engineering, software design and other language-agnostic concepts.

Also read your compiler documentation. There's no point in focusing on a feature defined by the standard if your compiler doesn't support it.

Share this post


Link to post
Share on other sites
OK, let me ask the question correctly.
What is a good book that teaches Standard C++? Please recommend only books you compared to other books, because the people that read only one book always say that it's good.
Actually, since I've read a C++ book, I know the language. But googling shows that this book doesn't make you a pro, and I still have something to learn after that. I need a book that makes you a professional programmer.

// should I edit my first post?

Share this post


Link to post
Share on other sites
Quote:
Original post by kickkick
OK, let me ask the question correctly.
What is a good book that teaches Standard C++? Please recommend only books you compared to other books, because the people that read only one book always say that it's good.
Actually, since I've read a C++ book, I know the language. But googling shows that this book doesn't make you a pro, and I still have something to learn after that. I need a book that makes you a professional programmer.

// should I edit my first post?

There is no such thing as a book that will make you into a professional anything, especially not a programmer. Programming takes experience, books don't teach experience. The best way for you to get experience is to program, not waste time trying to learn everything from textbooks.

Share this post


Link to post
Share on other sites
Let's say I've read a good book on C++, and I have talent and great interest in programming, I learn fast and bla bla. Can we say that from now on am I on my own to become a pro?
If no book can teach me more then that's just it...
What should I continue with? MFC?

Share this post


Link to post
Share on other sites
I highly doubt you know the C++ language in its entirety. You may know tidbits of it, however, but that does not mean you know the language in its entirety. C++ has far too many special cases for anyone to know the whole thing, not even those who sit on the standard committee.

Programming is a process of learning. It has little to nothing to do with what language you prefer to use, but more with your mindset and how you solve problems. All the books in the world cannot teach you how to become "professional" because the typically accepted definition of what a "professional" is, is someone who is employed in a particular field, or having shown a great deal of skill in that area. The only way to obtain skill is to practice.

Books on patterns don't teach you to recognize patterns, nor do they teach you when and how to use patterns. They can give hints, and show some patterns that the authors have encountered, but that does not mean they are all of the patterns you will find, nor does it mean that those are the only places that those patterns can be or will be used. They are just hints, the rest is for an experienced programmer to figure out, because that's what programmers do: Figure things out. Solve problems by finding solutions.

Books on design can't teach you how to design any application you want. They are guideposts that give you hints and clues as to steps you can take to design applications that are extensible and easy to maintain. That does not mean that the application will end up being either, just that they (the authors) have found that more often than not, those techniques documented in the book resulted in better applications.

That does not make either of those two final arbiters on the subjects at hand. The authors, while experts in their own right, have not encountered every concievable problem, and as such do not have all the answers. But they do know how to GET the answers, by performing research in various manners. Either through use cases, prototyping, through asking their peers, or just by some good old fashion logic.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement