Starting off in C++

8    07 Aug 2015 19:45 by u/jxfaith

I'm interested in learning C++. I'm definitely not new to scripting languages but would hesitate to call myself an intermediate coder, having only partial mastery of Python at best. There seems to be a lot of polarized opinions about the quality of C++ books and tutorials, so I hoped to get some opinions before I start. Better to prevent problematic misunderstandings before they get ingrained.

  1. Can I pick up C++ without paying for a book? If so, what sources would you recommend?
  2. What books are ideal for a user with some good scripting fundamentals, but lacking in refined mastery of a particular language?

11 comments

4

Accelerated C++ is hands down the best book for learning C++.

1

C++ primer is a good book but only if you have gone through a newbie C++ book first. I went through a book my someone with last name zak that turned out to be horrible. I'm going through the primer book now and it's hands down the best C++ book for anyone who is a level higher than newbie. You will learn a TON with 1k pages of densely packed knowledge. This book takes you to the next level. A bit dry and no fun for my tastes. I own the print version and the thing is huge and it's thick as hell with thin pages. Weighty.

1

Maybe you know this already, but be aware that, and this is the case with many languages, it's one thing to learn C++ the language but it's another to produce something working. Python you just write the code and it goes. In something like C++ you have to learn about the compiler, external libraries, OS-specific details as well as the language itself. I've always personally found it a little daunting.

0

I love the Bjarne book. Excellent for learning as well as reference. My copy is dog eared from use.

0

I love Stroustrup, but this isn't the best book to start with.

0

Please, please, please actually read the language standard. C++ might be a bit too big to read all at once but you should at least read the C language standard and you should have both on hand for reference. You can find draft copies of the standards for free.

-1

Why are you interested in C++. Unless you are inheriting an established code base there is a better choice. Heck some of the time there are better choices even when inheriting a code base. Not a dig on C++ this is true of any programming language.

-1

Answers to your question:

  1. No. Invest in good learning materials. Buy good books. The reason is, there is a lot of garbage-y or outdated information on the internet that will teach you bad things. The truth is, the answer to your question is "yes", but it's a lot easier with books, so save yourself the trouble.

  2. Books I always recommend to C++ beginners: Lippman's "C++ Primer", followed by Scott Meyers' "Effective C++" and "Effective Modern C++". You should also probably read "A Tour of C++" by Bjarne. I'd say hold off on reading the other, more well-known Bjarne's book, it's big and fairly difficult to get through. Once you get more experience, you can try reading the standard (the formal document that defines what C++ is) a bit, and get an understanding of how tough a C++ compiler author's job is :)