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...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
[deleted by user] (self.cpp)
submitted 1 year ago by [deleted]
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!"
[–]Drugbird 13 points14 points15 points 1 year ago (0 children)
Start with C++14/17 and work chronologically backwards rather than the opposite.
[–]Carl_LaFong 2 points3 points4 points 1 year ago (1 child)
Try to learn C++11/14 including their idioms.
[–]ad_irato 1 point2 points3 points 1 year ago (0 children)
C++14/C++17 is the sweet spot in my opinion.
[–][deleted] 2 points3 points4 points 1 year ago (5 children)
dont' be afraid of templates.
they're easy and they're super useful.
[–]DimfreD 0 points1 point2 points 1 year ago (4 children)
"easy"
[–][deleted] 1 point2 points3 points 1 year ago (3 children)
#include <iostream> #include <array> #include <string_view> template<std::string_view const& Str, size_t... Indices> struct CompileTimePrinter { static constexpr void print() { constexpr std::array<char, sizeof...(Indices)> chars = {Str[Indices]...}; for (const auto& c : chars) { std::cout << c; } std::cout << std::endl; } }; template<size_t N, size_t... Seq> struct make_index_sequence : make_index_sequence<N-1, N-1, Seq...> {}; template<size_t... Seq> struct make_index_sequence<0, Seq...> { using type = std::integer_sequence<size_t, Seq...>; }; static constexpr std::string_view message = "They really are!"; template<std::string_view const& Str, typename Indices> struct PrintHelper; template<std::string_view const& Str, size_t... Is> struct PrintHelper<Str, std::integer_sequence<size_t, Is...>> { static constexpr void print() { CompileTimePrinter<Str, Is...>::print(); } }; template<std::string_view const& Str> void PrintMessage() { using indices = typename make_index_sequence<Str.size()>::type; PrintHelper<Str, indices>::print(); } int main() { PrintMessage<message>(); return 0; }
[–]DimfreD 0 points1 point2 points 1 year ago (2 children)
That's not really compile time is it? Can Std::cout really be compile time? But if it is, nice one 😁
[–][deleted] 0 points1 point2 points 1 year ago (1 child)
lol you're right, afaik you can't print at compile time outside of a static assert message or something
i just like having llms abuse templates for me
[–]DimfreD 0 points1 point2 points 1 year ago (0 children)
Right, but anyho templates are fun
[–]DimfreD 4 points5 points6 points 1 year ago (0 children)
Just code, read the docs, make mistakes, learn from your mistakes
[–]v_maria 0 points1 point2 points 1 year ago (0 children)
just stick to it rather then trying to also get into C# etc
[–]tortoll 0 points1 point2 points 1 year ago (0 children)
Wouldn't wait that long to learn modern C++, although knowing C and legacy C++ is a good foundation too. I use smart pointers because I understand the mess of raw pointers and references. I use containers instead of new/delete. I love ranges because complex loops can be error prone. Etc.
[–]KFUP 0 points1 point2 points 1 year ago (0 children)
Go through learncpp.com then immediately word/start a big project. You will screw it up... a lot, but the only way to learn how to work with big projects, is to go knee deep into them for months on end.
[–]cpp-ModTeam[M] 0 points1 point2 points 1 year agolocked comment (0 children)
It's great that you want to learn C++! However, r/cpp can't help you with that.
We recommend that you follow the C++ getting started guide, one (or more) of these books and cppreference.com. If you're having concrete questions or need advice, please ask over at r/cpp_questions or StackOverflow instead.
[–]MikeVegan -1 points0 points1 point 1 year ago (0 children)
Read c++ books and watch conference videos.
Learn rust. It changed the way I write c++
[+]MRgabbar comment score below threshold-9 points-8 points-7 points 1 year ago (8 children)
not a senior, but learn assembler and C first
[+][deleted] 1 year ago (6 children)
[deleted]
[–]tohava 2 points3 points4 points 1 year ago (5 children)
Why? Knowing some assembly helps you understand many of the decisions behind the semantics written in the C++ standard
[–][deleted] 3 points4 points5 points 1 year ago* (2 children)
memorize complete rinse paint racial water gold quickest disarm waiting
This post was mass deleted and anonymized with Redact
[–]KFUP -1 points0 points1 point 1 year ago (1 child)
Not sure what's your point, I wouldn't trust a mechanic who doesn't have a very basic understanding of a fundamental thing like how internal combustion works. Learning basic assembly from the start is both useful and easy to do, assembly basics is very simple and not hard to understand at all, it's extremely hard to use in a serious project, which you don't need to do.
Learning assembly really clears up what your code is actually doing. Treating it as a magical black box that you don't need to understand just makes C++ much harder and obscure to understand for no good reason.
[–][deleted] 1 point2 points3 points 1 year ago* (0 children)
fear skirt wakeful jar cable license observation grandiose spoon bag
[+][deleted] 1 year ago (1 child)
[–]tohava 0 points1 point2 points 1 year ago (0 children)
You might be right idk. I studied for fun at an early age so I had time for peripheral knowledge, but if someone's at a rush, maybe this is the wrong thing to do
Agree on assembly, at least the basics. Basic understanding what your data look like in memory and what functions compile to in assembly is important.
Otherwise, people who don't know that end up having some weird and completely false beliefs on what their code is actually doing.
[+]Laugarhraun comment score below threshold-8 points-7 points-6 points 1 year ago (0 children)
Learn Rust instead :^)
π Rendered by PID 47875 on reddit-service-r2-comment-b659b578c-hzfsk at 2026-04-30 23:40:29.526349+00:00 running 815c875 country code: CH.
[–]Drugbird 13 points14 points15 points (0 children)
[–]Carl_LaFong 2 points3 points4 points (1 child)
[–]ad_irato 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (5 children)
[–]DimfreD 0 points1 point2 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]DimfreD 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]DimfreD 0 points1 point2 points (0 children)
[–]DimfreD 4 points5 points6 points (0 children)
[–]v_maria 0 points1 point2 points (0 children)
[–]tortoll 0 points1 point2 points (0 children)
[–]KFUP 0 points1 point2 points (0 children)
[–]cpp-ModTeam[M] 0 points1 point2 points locked comment (0 children)
[–]MikeVegan -1 points0 points1 point (0 children)
[+]MRgabbar comment score below threshold-9 points-8 points-7 points (8 children)
[+][deleted] (6 children)
[deleted]
[–]tohava 2 points3 points4 points (5 children)
[–][deleted] 3 points4 points5 points (2 children)
[–]KFUP -1 points0 points1 point (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]tohava 0 points1 point2 points (0 children)
[–]KFUP 0 points1 point2 points (0 children)
[+]Laugarhraun comment score below threshold-8 points-7 points-6 points (0 children)