views:

187

answers:

5

What should I learn after learning C++?

I have read C++ from books like C++ Primer, Effective C++ etc but now I want to learn some advanced topics.

So what should I learn now,any suggestions?

+6  A: 
  • It's always dry but interesting to pore over the c++ standard.
  • It helps to watch some discussions on StackOverflow.
  • You could pick a feature and learn it in detail, for example: Template Metaprogramming [1].
  • With C++0x coming up, you could start picking up on that. It has lots of new features that could keep you reading for hours at a time (e.g. auto, rvalue references).
  • Of course learning a language isn't the goal - it's what you do with it that counts. Now that you're comfortable, perhaps you can branch out into new uses of the language.

[1]: Modern C++ Design by Andrei Alexandrescu (I haven't read it, but I've heard good things) explores template metaprogramming in depth. Also, Boost has MPL, a TMP library.

Here's a SO question on real world uses of template metaprogramming.

Stephen
Could you please point to an area where Template Metaprogramming is(heavily) used?
gautam kumar
I have heard somewhere that learning C++/CLI would be pretty useful, what's your view?
gautam kumar
Libraries, e.g. many in Boost, make heavy use of TMP.
Cogwheel - Matthew Orlando
@gautam : I don't program on Microsoft systems, so it wouldn't be useful to me ;)
Stephen
Re: C++/CLI, it's main use is as a bridge between native C++ code and CLR (JIT-compiled VM, essentially windows-only) code. If you see yourself doing that, then by all means. ;) If you want to get into CLR programming, though, i'd recommend starting with C#. If you want to really expand your mind, you might also want to investigate other styles of programming. Erik Meijer has a great lecture series on Functional Programming with Haskell on channel9.msdn.com.
Cogwheel - Matthew Orlando
Functional programming is great, definitely worth learning to expand your brain... but learn it in a functional language - not C++.
Stephen
Thanks for your suggestions everyone. I think I should start learning TMP and C# in parallel ;)
gautam kumar
+1  A: 

The C++ Standard Library: A Tutorial and Reference by Nicolai Josuttis

John D. Cook
+2  A: 
  • First of all, I would suggest to start learning STL and looking at Boost libraries. They are a must for modern C++ programming.
  • Effective C++, More Effective C++ and Effective STL by Scott Meyers are all very good books.
  • C++ Templates - The Complete Guide by David Vandervoorde and Nicolai Josuttis is quite comprehensive.
  • Modern C++ Design by Andrei Alexandrescu will broaden your understanding of what can be achieved with templates.
Alex - Aotea Studios
+3  A: 

As you've already checked out Effective C++, etc., you might also want to check out Meyer's book on the STL (Effective STL) after cruising through Josuttis' book.

Boost is a very, very large library, but learning it (at least a bit at a time) is important for becoming a more productive programmer and for becoming a better programmer (study how they design and implement things).

Not knowing how many programs you've written on your own...if you haven't done extensive C++ coding, get cracking. Make a few small games, some apps that you think could be useful or interesting, whatever floats your boat. Reading and doing are quite different. As others have mentioned, you might also want to dabble in another language. A great exercise is learning a small scripting language, like Lua, and then integrating it by yourself into your C++ programs. It can be a lot of work, but it teaches you a great deal at the same time--how the two languages manage memory, how they handle garbage collection (if any), etc.

Gemini14
A: 

More than reading from books try writing a piece of code. More appropriately write in a piece of paper rather than on an IDE.

Start with simple things like swapping numbers, matrix multiplication using pointers etc thenmove on to inheritence etc. Write the code on a a paper. This would improve your knowledge leaps and bounds. Just try and let me know if it succeeds.

ckv