2 ms·
not sure. It has some good basic introduction, mainly to syntax, but (imo) leaves out and even goes against quite some good prcatices. If it would include that,
by stinos 13y ago
not sure. It has some good basic introduction, mainly to syntax, but (imo) leaves out and even goes against quite some good prcatices. If it would include that, instead of just laying out dry theory, it could be pretty good (eg I especially like the C++ FAQ Lite way of explaining why and not just how).
For instance there's a very small chapter on const saying it declares a variable you cannot change. A novice will just read it and forget it. It should (again, imo) say "use const for everything possible" and explain why that is.
Likewise, the strnig chapter starts with saying "use code like using namespace std; string blabla; or you can also use std::string" and leaves it like that without further explanation. A novice might read that, think the first one is less effort and just continue using it. It would be better to make clear the second one has some advantages.
I could go on like that (all loops using post-increment, chapter on array while vector is only covered in the last chapter, chapter on pointers but references are mentioned nowhere, really??, new/delete but no smart pointers anywhere, templates, lamdas or most C++11 features for that matter, ...) but of course there's always a line between introductionary and deeper knwoledge and it's not entirley clear to me where the authors wanted to draw the line. Also there's a lot to tell about C++ of course. Yet, we're in 2013, close to C++14, and C++ has evolved a lot. Large parts of modern C++ programs look nowhere close to what is presented in this book.