tags:

views:

385

answers:

6

I haven't touch C++ in more then 8 years. I recently had to do fix some C++ code, and although I still can code, I feel like I no more belongs to the camp of C++ programmers. I don't know any libraries, didn't pay attention to the new language features / improvements / best practices.

Qt Creator and Qt seems like a nice toolset for what I need now, since I'm interested mostly in cross platform development.

What would be good resources for someone like me to quickly re-learn C++ and best practices in shortest period of time?

I have been doing mostly java and common lisp in the meantime, with a short strides to C, flex, Scala and Haskell.

+4  A: 

Get to know the S.tandard T.emplate L.ibrary.

Get to know boost, if you are really on the cutting edge.

Read the books "effective c++", and "effective STL" by scott meyers.

Read the "C++ faq lite".

(not necsissarily in that order)

Ape-inago
+1  A: 

First get familiar again with pointers, references, etc.

Then I'd just stick with Qt. Qt's documentation rules and IIRC, Qt's containers are even more efficient than STL's. The fact that the code for your Qt GUI is then even more elegant also adds to Qt's appeal. Add to the fact that Qt's docs also contain many simple and some relatively advanced code examples which you can play with, and you should be up to speed again in no time.

It wouldn't hurt to know/use STL/Boost though. But stay (far) away from GTK.

Wim Leers
you don't forget about pointers. it's like riding a bicicle, you hit the ground a few times and never forget it. come to think about it, you also get the same fresh air freedom...
Javier
Not to mention: forget about bare pointers. Smart pointers are so much better. (OK, I'm exaggerating a bit, but smart pointers have ways to get the bare pointer back.)
David Thornley
How do you determine that Qt's containers are more efficient then STL's containers?
the_drow
QT has many interesting features, elegance not being one of them. The signal/slot mechanism is great in functionality, but a rough solution. If the OP is interested in getting back to C++, QT is not the way, as it redefines parts of the language with macros and the like. First work real C++, then use QT if you wish.
David Rodríguez - dribeas
+2  A: 

If you're into GUI development, go with Qt. It's the best out there, and the price is right. It deviates somewhat from hard standards; but not without reason, and even so, it makes some efforts to use similar coding styles where appropriate.

If you're more into CLI, or server processes, Qt can still help; but it doesn't have so big an advantage. There it would be more productive to go with STL and (specially) Boost.

Javier
+12  A: 

Read :

Those are references books on C++ that resume all the modern effective pratices, philosophies and knowledge on C++ (without going into Meta-Programmation stuff).

Then if you want to go farther, read :

About libraries: first learn about the STL and learn to use Boost as a "standard" STL extension.

Klaim
+1 For the Modern C++ Design.I'm a loki-lib developer :)
the_drow
+1 for Effective C++. It's the gold standard and honestly if I were in charge of a team I would make sure everyone read it.
rlbond
The best list of C++ books I've seen yet. I wish every C++ developer would read each one of these cover to cover.
I didn't expect reading 5 + 2 books is considered quickkly ;) Anyways, thanks for the info.
Dev er dev
Well, the first books are not so big and they are made of "points" instead of chapters. You should read them first and come back to them when you think you're in a situation described in those books. The two others are more for template library implementers but it's good to know what you could do with template - it's a good way to know to fear and respect them enough to not mess up with their complexity later.If you can read at your job, you will read all that in few days, but no digest all. You'll digest by practice with knowledge only.
Klaim
awesome post! thanks for the links... :D
Ape-inago
+1  A: 

Code code and then code more!

Try doing projects where you mix up techniques you acquire from books. As mentioned in other posts there are a loot of good books on C++ programming.Applying design-patterns and techniques from these books into real coding situations will get you back on track quickly.

Also, as long as you're coding for experience, don't be afraid of trying a loot of different libraries. Multitude is good since it helps you get a feeling for how different libraries are built as well as it helps you find the libraries that you want to use for real projects later on.

Silfverstrom
+1  A: 

Have a look at A.Koenig and B.Moo's Accelerated C++.

The other books cited are good books, but they'll require you a lot of time to read them all. AC++ teaches modern C++ (as in opposition with historic C++ -- it's not about templates wizardry).

The latest book from B.Stroustrup, Programming -- Principles and Practice Using C++, seems (I haven't read it yet) also interesting.

Luc Hermitte