I need to learn C++ in order to learn building Nokia WRT and or maemo application. I need to know what gotchas and what aspect of C++ that I need/have to learn or focus more. One thing I got in my mind is that C++ doesn't have garbage collector. Therefor, I need to focus on variable type. But, is there any others that really important and I can't ignore it?
Main gotcha is to try to envisage C++ in terms of how it differs from PHP or Java.
Sorry, it just doesn't work like that. C++ differs from those languages in almost every important respect beyond the syntax for arithmetic. Sometimes the differences are subtle. You need to learn it fresh, and not think that something that's appropriate to do in PHP or Java will work well for you in C++.
That said, common difficulties include:
operator=
; avoiding having to implement copy ctors, dtors, operator=.myarray[i] = i++;
is a favourite). PHP and Java are both more "tightly" defined languages than C++: firstly the behaviour of a program is more likely to be defined and hence reliable. Because of this, separate implementations are more similar than C++ implementations. It's pretty easy to write a program in C++ that doesn't just do the wrong thing, it does wildly different things on different runs, including crashing, corrupting data, etc.