Hacker News new | ask | show | jobs
by mh-cx 1255 days ago
If you already know a programming language and prefer a more concise tutorial you might also like this site:

https://cplusplus.com/doc/tutorial/

It's way less verbose and more to the point.

3 comments

You should absolutely not use or recommend that site. It's stuck on incomplete C++14 at best and also contains some pretty bad code. learncpp.com is a much better tutorial and cppreference.com is a much better reference. The only thing cplusplus.com is good at is polluting search results.
Back when I was a software engineer, I used to constantly hear how bad cplusplus was. Yet, in spite of this, I'd fairly often find myself using it because the results were just so much easier to parse.

Just as an example, cppreference doesn't have a page dedicated to std::string (when you search for it on Google, it tkes you to std::basic_string) whereas cplusplus does.

Even comparing the two pages, cplusplus immediately gets to the point that std::string is just a std::basic_string<char>, whereas cppreference has three paragraphs of technical minutiae before it finally points out what std::string is.

Even though cplusplus is out of date and incomplete, it's still often more useful than cppreference when you're trying to get your head around STL for the first time.

cppreference has a steep learning curve with how information dense it looks, but once you’re up to speed you can move a lot faster with the standard library. I find it’s the site I always have a tab open on.
I haven't done any C++ since 2015ish but your link seems incredibly outdated.

Sure you'll learn some C++ syntax, but you'll learn the C++ from 20 years ago, not the modern C++ with smart pointers and all that stuff which is basically turning it into a new language.

Is it a bad idea to learn from Stroustrup's 'Principles'?
No, it is a great book to get started with C++ if you already know programming.

Relevant: https://news.ycombinator.com/item?id=34233688

as someone that has done a lot of commercial C++ teaching in his time, i would say that this is one to avoid for a beginning programmer. stroustrup is not, imho, one of the worlds great teachers, and i would not recommend C++ as a first programming language. more experienced programmers should go with TC++PL.
Interesting. I'm sort-of experienced (never pro, but lots of little projects in JS & Python. I got Principles to try and fill in gaps in my basic knowledge & so far it seems like it has been helping. I'm a little over halfway through. What else would you reccommend?
josuttis's books on the standard library and templates are very good
Or in even more concise way here: https://learnxinyminutes.com/docs/c++/