4 ms·
Seems to be missing some important points: const methods - if you declare a const rectangle r, you can't call r.surface() unless it's declared int surface(void
by AshleysBrain 15y ago
Seems to be missing some important points:
const methods - if you declare a const rectangle r, you can't call r.surface() unless it's declared int surface(void) const {....
references - article seems to be confused why they exist. They enable some extra handy features, e.g. you can pass a temporary to a function parameter taking a const reference. e.g. you can pass f(MyClass()) if it's declared void f(const MyClass&), but not if it's declared void f(const MyClass*).
STL - things like std::string, std::vector, std::map - totally invaluable!
And lastly, the fact that programming in C++ is completely different to C. It's not like C with bolted on features. It's a whole new paradigm. For example, in modern C++, you very rarely have to manage memory. Smart pointers and containers can generally manage it all for you.