HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
A Tour of C++ (C++ In-Depth Series)

Bjarne Stroustrup · 11 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "A Tour of C++ (C++ In-Depth Series)" by Bjarne Stroustrup.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
The C++11 standard allows programmers to express ideas more clearly, simply, and directly, and to write faster, more efficient code. Bjarne Stroustrup, the designer and original implementer of C++, thoroughly covers the details of this language and its use in his definitive reference, The C++ Programming Language, Fourth Edition. In A Tour of C++ , Stroustrup excerpts the overview chapters from that complete reference, expanding and enhancing them to give an experienced programmer–in just a few hours–a clear idea of what constitutes modern C++. In this concise, self-contained guide, Stroustrup covers most major language features and the major standard-library components–not, of course, in great depth, but to a level that gives programmers a meaningful overview of the language, some key examples, and practical help in getting started. Stroustrup presents the C++ features in the context of the programming styles they support, such as object-oriented and generic programming. His tour is remarkably comprehensive. Coverage begins with the basics, then ranges widely through more advanced topics, including many that are new in C++11, such as move semantics, uniform initialization, lambda expressions, improved containers, random numbers, and concurrency. The tour ends with a discussion of the design and evolution of C++ and the extensions added for C++11. This guide does not aim to teach you how to program (see Stroustrup’s Programming: Principles and Practice Using C++ for that); nor will it be the only resource you’ll need for C++ mastery (see Stroustrup’s The C++ Programming Language, Fourth Edition, for that). If, however, you are a C or C++ programmer wanting greater familiarity with the current C++ language, or a programmer versed in another language wishing to gain an accurate picture of the nature and benefits of modern C++, you can’t find a shorter or simpler introduction than this tour provides.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
I'm not sure how C++ for DL is different from regular C++ so take my advice with a grain of salt.

I took a class under Bjarne Stroustrup and he highly recommended Tour of C++ [0] as the best way to learn modern C++ for someone who already has some programming experience. That and of course, Effective C++[1] by Scott Meyers.

[0] - https://www.amazon.com/Tour-C-Depth/dp/0321958314

[1] - https://www.amazon.com/Effective-Specific-Improve-Programs-D...

saagarjha
These days, you want Effective Modern C++. It's a lot newer and goes over recent features.
randcraw
I'd agree with the shout out for Tour of C++ as a good first book. Unlike most C++ intros, it's concise (192 pages) and up-to-date enough to exemplify C++'s standard forms (esp. 98 and 03). If you plan to develop in C++ you'll want other books with more examples and reference, but these will shift the focus more onto trees than forest (at ~1000 ppg).

Accelerated C++ by Koenig and Moo is another nice short overview of C++, but assumes more familiarity with C and OOP principles.

Get this - https://www.amazon.com/Tour-C-Depth/dp/0321958314. If you are stuck at any point ask on /r/cpp, people there are very friendly and knowledgeable.
Dec 06, 2017 · parasight on C++17 Standard Published
I'd recommend to choose one of these two books:

Programming: Principles and Practice Using C++, 2nd Ed., Bjarne Stroustrup https://www.amazon.com/Programming-Principles-Practice-Using...

C++ Primer, 5th Ed., Stanley Lippman https://www.amazon.com/Primer-5th-Stanley-B-Lippman/dp/03217...

For a very brief introduction:

A Tour of C++, Bjarne Stroustrup https://www.amazon.com/Tour-C-Depth/dp/0321958314/ref=sr_1_1...

sn9
Here's more info regarding book recs: https://isocpp.org/wiki/faq/how-to-learn-cpp#best-book
I think C can be a good introductory language, but it should definitely be coupled with a CS textbook so you understand why C offers the things it does.

I definitely agree that C++ should be picked up later, though. Stroustrup's A Tour of C++ - https://www.amazon.com/Tour-C-Depth/dp/0321958314 - is a good introduction, I think.

Jan 01, 2016 · pmelendez on } // good to go
Yes, there is...

A Tour of C++

by Bjarne Stroustrup

http://www.amazon.com/Tour-C--Depth/dp/0321958314/ref=sr_1_1...

I heartily recommend the first couple of chapters of Stroustrup's C++ Programming Language Fourth Edition, where suddenly everything makes sense and you never want to see naked new, delete or double pointers ever again. Use references everywhere, and ensure you have sensible constructors and destructors.

That is essentially the content of his short book, A Tour of C++:

http://www.amazon.com/A-Tour-C-In-Depth/dp/0321958314/ref=pd...

jbandela1
You can find the content for free as pdf files at

https://isocpp.org/tour

It really is a very nice overview.

72deluxe
Ah yes but with the full book you get to look up the various concepts further on in the book if you don't "get it" within the intro section. There are times where ideas are introduced within the intro section but are tersely explained, where reading a section in the later chapter will make lightbulbs turn on in my head and it made sense.

Of course, the "Tour of C++" book is great as well. But the full thick book is fantastic. Nice font in it compared to the Third Edition too (kiss goodbye to serif fonts).

C++ - "A tour of C++"

http://www.amazon.com/Tour-C--Depth/dp/0321958314

I read this book after having programmed C++ with the common "C++ is C with classes" attitude for a while, and it really made me change the way I looked at this language.

It was the book that made me realize how beautiful the RAII idiom is, that the STL was clearly not hacked together by a bunch of crazy monkeys, that you rarely need raw pointers in your code and that -- in contrast to popular belief -- you seldom need to care about memory management.

When I finished that book, and though in the full knowledge that I was dealing with this ugly monster of the Frankenstein kind; just like at the end of "the beauty and the beast", I had somehow come to respect and appreciate that language.

gtani
the big 4, 2 very large dense books, and 2 small, very very very dense books:

- Lippman et al, C++ Primer, 5th ed

- Stroustrup, The c++ Language, 4th ed (which has earlier version "A Tour of" as 1st 150 pages

- Meyers "Effective C++", 3rd ed and

- "Effective Modern C++" http://www.aristeia.com/books.html (don't dismiss the others cause theyre 14+ years old, either

raincom
I have to second this 180 page book "A tour of C++". A best book out there to get an overview of the C++ land. There are so many bad books out there on C++; there is a guy in Israel, who maintains a list of bad books on C/C++.
pakled_engineer
http://www.springer.com/us/book/9781430266679 Advanced C and C++ Compiling by Stevanovic, Milan I've been reading to hack around node.js to customize it
As other said, Meyer's book is highly recommended.

Also, this talk would give you a very general overview of the new features of the language:

http://channel9.msdn.com/Events/GoingNative/2013/Opening-Key...

Another book that can be a refresh introduction would be:

http://www.amazon.com/Tour-C--Depth/dp/0321958314/ref=sr_1_1...

Herb Sutter, one of the most prolific C++ experts out there, recently gave a talk on Modern C++ [1]. In the beginning of his talk, he states that every C++ developer should read a "Tour of C++" [2] by Bjarne Stroustrup, the original designer of C++.

I recently read it and it's great. The book has less than 200p, but still covers the most important parts of C++11, albeit not in great detail (the reader is pointed to "The C++ Programming Language" by the same author for that). Read it! And watch the youtube video in [1].

[1] https://www.youtube.com/watch?v=xnqTKD8uD64 [2] http://www.amazon.com/Tour-In-Depth-Series-Bjarne-Stroustrup...

Cyph0n
Bookmarking because I also plan on entering C++ soon. I really don't want to be too behind.
ghantila
cppreference.com is a good resource too. It's updated frequently.

http://en.cppreference.com/w/

lallysingh
I can't stand that site. I try to use the old SGI stl reference whenever I can.
throwawayaway
it's a great site, but it's jarring at first. the sgi stl reference doesn't have a lot of c++11 in it.
cubbimew
How is the reference for a library abandoned over 15 years ago even relevant? (other than when researching history)
forrestthewoods
whoa really? To me cppreference is the single best example of code documentation I've ever used. Clean, easy to search, thorough but skimmable listing of interfaces, great example code, modifiable example code, provides necessary information not part of function declarations (iterator invalidation rules). I'm surprised you prefer the far more bare bones SGI version.
You're asking more specific questions that what I will cover, and they're good ones. It will be interesting to read how others reply.

For the other people looking, Stroustrup's A Tour of C++ [0] is the guide for getting quickly up to date with the "new C++", C++11 and onwards. It doesn't specifically cover C++14, but if you understand C++11, the few things coming in C++14 are for the most part minor enhancements to what is in C++11.

Scott Meyers should finish up the C++11/14 version of the Effective C++ series this year, and many are waiting for this. For now, his notes Overview of the New C++ (C++11/14) [1] are available for purchase.

If you like videos, there is a wealth of information from last years GoingNative conference [2]. More recently, at this years Build conferece, Herb Sutter gave a presentation on Modern C++: What You Need to Know [3].

Finally, come visit up over on reddit in /r/cpp [4]. Some heavyweights in the C++ world participate there, and the larger portion of participants are similarly knowledgeable in C++ as a whole.

[0] http://www.amazon.com/Tour-In-Depth-Series-Bjarne-Stroustrup...

[1] http://www.aristeia.com/Licensing/personalUse.html

[2] http://channel9.msdn.com/Events/GoingNative/2013?direction=a...

[3] http://channel9.msdn.com/Events/Build/2014/2-661

[4] http://www.reddit.com/r/cpp

yid
Thank you very much for those links. In particular, the Stroustrup book looks phenomenal at less than $20 used for a dead tree version.
flohofwoe
Definitely take the time to watch the Herb Sutter video (number 3), the first half is mainly about how modern C++ differs from old C++, and the second half is all about how important control over the memory layout of your data is (spatial locality, CPU caches, linear arrays vs lists, etc...). This is one of the most interesting, and most relevant talks about C++ I've seen yet.
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.