I have some experience in Java programming and enterprise application development. I have done OOP, data structures in C++ for my undergraduate studies. But I couldn't touch C++ for years. Now I am interested in C++ again and I would like to polish my C++ knowledge and become an expert in C++ . How do I start my journey in C++ again?

In this journey would like to learn some advanced concepts in C++ like network programming, distributed computing,.. etc.


3 Answers 3


Obviously there are a lot of areas you can look at, STL and Boost libraries spring to mind, but as an ex-Java developer you need to fix up the basic concepts that are different first.

Chief amongst these is object lifetimes, in Java you have a GC and finalisers and all that, with C++ you have explicitly defined scopes and deterministic places where your object will (automatically) go away when it leaves scope. Typically you create an object on the stack rather than the heap in C++, and let the compiler decide when to free it. Do not think that you have to create all objects on the heap and let the GC decide when they're no longer used. If you do need a longer lifetime object, or a large one that would suit living on the heap, use a smart pointer class to manage it. You might want to check up on the latest spec with its features like lambdas and especially the move operator syntax too.

Google for RAII and make sure you learn C++ scopes, its trivially easy, but like many things that are easy you need to take the small amount of time to understand them.


I would suggest one piece of advice, go on stackoverflow, look for unanswered questions about C++ and try and answer them. The amount you learn from answering questions is immense, and you'll be surprised how often they tend to crop up as issues further down the line for you.


Disclaimer: What you read here are my personal ideas and they are not necessarily correct or widely accepted.

In short, practice! and probably more practice. If I want to talk in detail, there are few things that I like to point out. I was in more or less the same situation, having some experience in java and knowing c++ in surface.

To master c++ neither books nor video lectures were so much of help. Don't get me wrong, books are fine but in my case, it was only a matter of checking syntax or knowing the concept in detail. What really helped me, was developing couple of very serious projects with c++ and while doing that, I pretty much mastered some of the most important concepts. So again, practice, doing projects and meanwhile knowing what you are doing. By "knowing what you are doing" I mean you should know what exactly your code is doing (e.g. what is the difference between pass by reference and pass by pointer and etc).

Moreover, you should learn some details like how the compiler and linker work, what are macros and more. The point is, java is very nice language when developing(personal opinion); it's easy and fast to develop and you don't really need to be worry about lots of programming aspects. C++ on the other hand is not that easy. If you want to really master the language, you should know about the details of compiler, linker, macros, debuggers and etc.

I don't want to start a battle of operating systems here but I strongly suggest to work with linux. Nice architecture of linux allows you really see how things work and tools like cmake (which is cross platform btw) allows you to have a better understating of the compilation process. If you don't wanna use linux, at least forget about automated IDEs like ms visual studio where everything happens with a simple click.

But if I want to make only one suggestion, I have to repeat again: PRACTICE!

  • I think the OS suggestion is misguided: Learning a new language is IMHO best done in the environment you know best. If you're a comfortable *nix user, then by allmeans *nix is an option for the environment to learn (c++). On the other hand, if all you know is Windows, then reccommending to use Linux just because some tools may be slightly better is doing a disservice, because wolrking on a different platform than the one you're used to will just create a lot of little problems that you ave to deal with instead of concentrating on learning the language.
    – Martin Ba
    Jan 15, 2013 at 12:08
  • What would you recommend in place of automated IDEs? What do you use?
    – David G
    May 16, 2014 at 21:44
  • @david, maybe that word automated was a bit misleading. My point was regarding cases like how linker works or how do you include a new header file to a project and etc. When on msvs, you add a new include directory and it's done. A new user would find it convenient but may not realize what is happening on the background. Instead, if our user tries out with make or cmake sees where these files are coming from, how he/she should compile the code, how to provide link libraries and/or what are compiler flags for that matter.
    – Pouya
    May 16, 2014 at 22:34
  • @david, cntd: With that being said, I would suggest any editor! gedit, sublime, nano! and use make, cmake or pure command line for building the project. If you are already feeling comfortable with aforementioned parameters, then I would actually suggest some IDEs. Netbeans, qt-creator, emacs, etc.
    – Pouya
    May 16, 2014 at 22:36

Not the answer you're looking for? Browse other questions tagged or ask your own question.