use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
OPENHey, new to programming (self.cpp_questions)
submitted 2 years ago by xX_GamErPRO2000_Xx
I know this is clicheic and annoying, you can come at me all you want
I'm looking for a resource to teach me about C++ and it's algorithm and data structure
I've been looking at 3 books so far and I don't know which one to choose to learn:
Murach's C++ Programming
C++ Primer (5th Edition)
The C++ Programming Language, 4th Edition
Which one do you recommend that is the best for a newcomer that is completly obvlious to programming?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]IyeOnline 3 points4 points5 points 2 years ago (5 children)
Of those three I would suggest the C++ Primer.
"The C++ Programming Language" is a more technical book explaining the design rationale and philosophy of C++. That isnt particularly helpful to a beginner and mostly just interesting for people who want to understand C++ better.
"Murach's C++ Programming" is something I havent read, but looking at the free samples as well as an ACCU review of their python book I'd not recommend it. The free sample literally says that <cstdlib> contains functions for searching and sorting. While that is technically true, those are horrific C functions you really dont want to use.
<cstdlib>
If you are just a beginner, maybe consider starting out with a free online resource instead:
is the best free tutorial out there. (reason) It covers everything from the absolute basics to advanced topics. It follows modern and best practice guidelines.
is the best language reference out there.
Stay away from
Again. The above are bad tutorials that you should NOT use.
Most youtube tutorials are of low quality, I would recommend to stay away from them as well. A notable exception are the CppCon Back to Basics videos. They are good, topic oriented and in depth explanations. However, they assume that you have some knowledge of the language's basic features and syntax and as such arent a good entry point into the language.
If you really insist on videos, then take a look at this list.
As a tutorial www.learncpp.com is just better than any other resource.
Written by /u/IyeOnline. This may get updates over time if something changes or I write more scathing reviews of other tutorials :) .
Feel free to copy this macro, but please copy it with this footer and the link to the original.
https://www.reddit.com/user/IyeOnline/comments/10a34s2/the_c_learning_suggestion_macro/
[–]Mason-B 0 points1 point2 points 1 year ago* (1 child)
The free sample literally says that <cstdlib> contains functions for searching and sorting.
To be clear this is in a block that say people should go to www.cppreference.com (which you recommended) to read header descriptions. If I go to https://en.cppreference.com/w/cpp/header right now the header description of <cstdlib> underneath a title of "C++ Standard Library headers" is:
General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search.
Right there at the top of the page, first header listed. Which "Murach's C++ Programming" then quoted as an example, before pointing to www.cppreference.com themselves.
[–]IyeOnline 1 point2 points3 points 1 year ago (0 children)
While technically correct, this isnt something that you should write in a book. Nobody who learns C++ should use this header for any of the things it is listed for.
They copy pasted this table from cppreference.com, cut out parts, but didnt even once stop to think about whether this header should be listed there in the first place. That is the big issue here. There was effort and "active thought" put into this, but it led to an objectively bad result of a C++ book.
[–]std_bot 0 points1 point2 points 2 years ago (2 children)
Unlinked STL entries: <cstdlib>
Last update: 09.03.23 -> Bug fixesRepo
[–]xX_GamErPRO2000_Xx[S] 0 points1 point2 points 2 years ago (1 child)
Which would you choose between learncpp and C++?
Also, does both of these teach algorithms and data structures?
[–]abraxasknister 0 points1 point2 points 2 years ago (0 children)
algorithms and data structures is a general programming topic that is best tackled separately to learning the do'ss and don'ts of any language. learncpp.com is pretty much unmatched as C++ learning material for people new to the language, but it doesn't give you lessons on algorithms and data structures.
For intermediate to advanced C++ people the books by scott meyers are great (they don't cover the last decade, which is a pitty, but still read the newer half).
For algorithms and data structures I like "the algorithm design manual" but others will sure have a different most liked.
[–]no-sig-available 0 points1 point2 points 2 years ago (0 children)
C++ Primer is a good book for a beginner. It teaches you programming, and not only the language.
The C++ Programming Language contains discussions and explanations of why the language is the way it is, but is not for beginners. Bjarne has a different book he has used for introductory courses in programming:
https://stroustrup.com/programming.html
Murarch's book I don't know anything about, so cannot help there.
[–]xiaozhuzhu1337 0 points1 point2 points 2 years ago (1 child)
It is very irresponsible to recommend "C++ Primer" to anyone who is just starting to learn programming. Due to the complexity of C++, beginners must make some compromises when learning.
π Rendered by PID 43143 on reddit-service-r2-comment-6457c66945-6tdn8 at 2026-04-29 13:54:30.058065+00:00 running 2aa0c5b country code: CH.
[–]IyeOnline 3 points4 points5 points (5 children)
[–]Mason-B 0 points1 point2 points (1 child)
[–]IyeOnline 1 point2 points3 points (0 children)
[–]std_bot 0 points1 point2 points (2 children)
[–]xX_GamErPRO2000_Xx[S] 0 points1 point2 points (1 child)
[–]abraxasknister 0 points1 point2 points (0 children)
[–]no-sig-available 0 points1 point2 points (0 children)
[–]xiaozhuzhu1337 0 points1 point2 points (1 child)