Tuesday, May 4, 2010

Introduction

I was refreshing C++ after gap of 3 years and I found it difficult to move from Java to C++. According to me there are several reasons for that.
  1. Syntax of Java and C++ is different in OOP world
  2. Java is more closer to OOP than C++
  3. C++ is more like collection of features than true OOP language for historical reasons
  4. C++ is huge and has features like pointers, operator overloading and others
I initially started with effective C++ but found myself getting lost in details as I was out of touch with many of the language features. I realized that it's best to refresh the language features from basic even if some part may look very trivial. I also realized that you have to write some code along the way, even simple hello world also helps in regaining the grip over the language.

It took around 2-3 days to cover most of the basic features. I got some confidence over the language and wrote basic pointer and tree classes in C++. Then came the break of 2 weeks. And I had to re-do some part of it. Luckily I maintained notes while reading C++. This blog is collection of notes, which I hope will be useful to someone going through same route.

As mentioned in effetive C++, language can be divided in 4 parts
  1. Basic C
  2. OOP
  3. STL
  4. Templates
This document summarizes OOP features of C++ and touches templates as feature. For part 1 K & R is Gita. Effective C++ is good read after you have got some handle over C++.

So as you could have make out these notes are for a programmer who has done decent coding in Java and wants to ramp up faster on C++.

No comments:

Post a Comment