Lurker News
Do you have some good advice or know any useful resources to learn in a proper way how to code in C++? For the context, I know some C, but C++ seems a different kind of beast, and it's easy to get lost in the huge variety of features and libraries it offers.

Comments (173) 47 threads

Earlier comments
therealmarv#
Build simple command line programs with it and use first a simple editor like Code::Blocks. Best thing to stop you learning C++ is using one of this beasts like VisualStudio and start with Windows programming ;)
mannykannot1 reply#
Take a look at how the standard library does things, and particularly anything for which it is not clear to you how one might implement it, or the use of anything whose purpose you don't really understand.
Const-me1 reply#
Large parts of the standard library are designed badly. E.g. io streams are horrible, allocators are questionable.
DoofusOfDeath1 reply#
> Large parts of the standard library are designed badly.

That's true, but IMO it's useful to study the standard library to understand what it offers, as opposed to examples of well-designed C++ code.

Const-me1 reply#
People who spent many years developing C++ already understand what the standard library offers, regardless on whether they studied that deliberately.

People coming to the language lack the expertise to tell well-designed code from bad-designed. It’s tempting to treat the whole standard library as an example of the former.
Maybe that’s a personal thing but I remember doing that when I just started my career back in 2000. STL wasn’t quite there but MFC was already in wide use. Because I lacked the experience I considered whatever’s there is good, and ended up using not so good parts such as C++ exceptions and macro-driven dynamic serialization.

Continue this thread — 1 reply

logandk#
Before diving into smart pointers, move semantics and other (mostly) recent additions, I would recommend getting well acquainted with the basics: RAII and common patterns such as passing by constant reference. Effective C++ by Scott Meyers, as others have noted, is an excellent entry point.

Load more comments