Hacker News new | ask | show | jobs
by ezolotko 4589 days ago
C++ is a programming language that is used in modern applications primarily for low level tasks like hardware interaction/embedded, games etc. This involves much dedication while learning, and a proper coverage of computer architecture aspects. This is why I do not see much point in learning C++ in a "For Rookies" way "in 21 days". If you want to be a C++ programmer, go find a good introductory C book which properly covers the aspects of memory management and pointers (like the Deitel's "C How to Program"). Then, gradually start C++ with something like Shildt, or again the Deitels. Then, maybe, one day you will want to look at the Stroustrup's book.

Otherwise, learn C# or Java or whatever quacks like a duck.

3 comments

That is really bad advice. C style memory management is useless in the presence of exceptions, and a nightmare to get right even in C. Choose a book that teaches RAII from the beginning, and leaves C style memory management to a late, advanced chapter.

Accelerated C++ used to be that book, don't know if there is a newer and better replacement.

I agree that in modern C++ you need to avoid all the bare-C ways. Actually, my C++ is almost C# if you look at it, especially with the new c++11 standard.

But I still believe that to learn C++ the best way is to start with C, pointer arithmetic, and classic strings. Otherwise you will just miss the point and join the hordes of script kiddies who "once started C++".

I agree that understanding of pointer is essential to use C++, but the problem is many learning materials force learners to believe the have to use pointer everywhere - which is opposite in reality…

So there should be a good guidance of avoiding pointers as much as possible when learner is stepping to C++ from C.

If you want/need to learn C++, learn C++. Learning C to learn C++ is a really poor idea.

There are plenty of people in my office who are like that and they can't see the wood for the tree. Writing out their own for loops instead of using whatever std algorithm would do the job better. Holding their own owning pointers in the presence of exceptions.

The problem is people tend to not to actually learn C++ properly, cover to cover. They just learn the bits they need as an when they need them missing out all sorts of details in the middle.

Schildt's book is riddled with errors.