tags:

views:

473

answers:

6

I just purchased C++ GUI Programming with Qt4 and after reading the code samples in this book I'm beginning to realize that my knowledge of C++ is incomplete. I learned C++ two years ago from online tutorials and a couple of ebooks I downloaded, and it turns out none of these resources were good enough. Since then I haven't touched the language and have been using Python instead.

Now I'm thinking of purchasing a good book on C++ that covers advanced topics, and the one I have in mind is Bruce Eckel's Thinking in C++ (both volumes). I know they are available for free on the web, but I really can't stand reading books on a laptop screen.

Since C++0x might be out pretty soon, is it wise to go ahead and spend cash on these books? Will C++0x break backwards compatibility? Volume 2 covers features like multithreading, templates etc. Would any of these features change significantly in C++0x?

+1  A: 

Even if the backward compatibility is broken on some features, the biggest part should be still usefull.

Furthermore, the first books on C++Ox might not be the best ones.

I would prefer a very good book on C++ to a book on C++Ox.

Burkhard
A: 

You might try a site like Safari Books Online to keep up-to-date with technical and programming books. I've bought several Ruby- and Ruby on Rails-related books in the past and they're now much less useful because the stuff in them is deprecated.

Sarah Vessels
Ruby and Ruby-on-Rails are both churning much more heavily than C++. Some of my most useful C++ books are over 8 years old, and they will continue to be useful with C++0x, because they are about language fundamentals, not library features.
Tom
+6  A: 

It is certainly wise to buy the book. C++1x will hardly break with previous code. Nearly everything you learn is also possible with the next C++, and it will greatly help you understand the need of why C++1x will introduce what feature. For example, why will it have variadic templates, and why those concepts?

Johannes Schaub - litb
+1  A: 

I would definitely go for buying the books

  1. Those from Eckel are really good books, and I really recommend them.
  2. It will take several years for compilers to catch up with new features introduced with C++0x (just look how was with template support!)
  3. It will take even more years for projects to start using them
  4. Finally, although I do not know with detail the3 changes introduced with the new release of the language, the C++ committee has always been very conservative on backward compatibility, therefore you should do not have any risk of learning something will be obsolete soon.
Roberto Liffredo
+11  A: 

I wouldn't hold my breath for C++0x. I doubt it will be out by the end of this decade. Even when it will be out, you should probably count a year or so for compilers to implement it. Learn the fundamentals now, and it should be relatively easy for you to learn most of the new features when the standard is out. The Standards Committee is known for its efforts to maintain backward compatibility.

I personally check with the evolution of the standard from time to time, just out of curiosity. Subscribe to Herb Sutter's blog feed and look for Standard updates.

My personal favourite advanced C++ book is Bjarne Stroustrup's The C++ Programming Language, 3e. It is the one single C++ book from which I think I learnt the most, with respect to language and STL details. Scott Meyers' books helped clarify a lot of things too. Meyers writes in a very readable language (English, I believe), and often what would happen is that I'd read an entire Item from Meyers' book, and then find the same information in Stroustrup's book condensed into a single sentence or so. That is to say Meyers' books are extremely useful in getting your attention to interesting details.

As for the changes I expect for threading, I think there going to be two new libraries for this purpose in the standard. Concepts are an even bigger change coming, and they are somewhat related to templates. Up until now we had concepts in the STL, but these were conventions; an algorithm would make assumptions about a type you pass to a template, and you'd know to pass the correct "type of type" because of the conventions. This implied terribly error messages, the STL template errors we all know and "love". Concepts will help solve these. There are other improvements (complexities) to the language. Herb Sutter talks about them a lot.

wilhelmtell
Notice that some compilers (gcc for example) already includes some c++0x features and are including more to get up to date as fast as possible. But you're right, it will not be "complete" and really interesting until maybe 2 years.
Klaim
+1  A: 

I'd echo the recommendation to get the Bjarne Stroustrup book "The C++ Programming Language (Third Edition and Special Edition)" http://www.research.att.com/~bs/3rd.html in addition to any other book you may be interested in, if you can afford multiple books. If you can afford only one and have mastered the basics (as you have) then I'd probably learn towards the Stroustrup book. You can't go past getting the facts from the man himself.

You can track developments in C++0x here: http://www.research.att.com/~bs/C++0xFAQ.html if you are interested. As previously commented, I wouldn't hold my breath if I were you.

duncan