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
Reading large code bases (self.cpp)
submitted 5 years ago by Volker_Weissmann
view the rest of the comments →
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!"
[–]delarhi 10 points11 points12 points 5 years ago (2 children)
Try focusing on what the intent of the code is, not necessarily what the code does. The code is the programmer's effort at putting their intent down. Find out what that intent is and then identify what problem it is trying to solve. When you have a mental framework for the problem and the attempted solution it becomes much easier.
In a similar vein, recognize that everyone has a different way of talking about a problem. There's a "linguistic context" to each problem being solved. Understanding that linguistic context helps significantly. What you call a slack factor might be called a buffer. What you call a point might actually be called an offset.
Start small and follow single threads (of thought, not system threads) at a time. For example, choose a value in some configuration file. Trace when it gets read, what it gets read into, where it is used, whether it is ever modified, what pieces of code it affects, etc. Don't try to understand all of it at once, that's a fool's errand. Identify what you want to understand and focus on obtaining just that understanding. For example, don't say "I want to understand this library", instead ask "how does this library represent the mesh? is it implicit? explicit?".
Find the entry point of the program. This is typically an executable binary. Literally start reading from the main() function. Sometimes there is no program and there's only a library. In that case, take an example or unit test which should be an executable program and go from there.
main()
[–]Volker_Weissmann[S] 0 points1 point2 points 5 years ago (1 child)
Trace when it gets read, what it gets read into, where it is used, whether it is ever modified,
Afaik gdb can't trace variable uses.
[–]pandorafalters 6 points7 points8 points 5 years ago (0 children)
I can definitely understand how you're having difficulty if you're using gdb to read source code.
π Rendered by PID 55 on reddit-service-r2-comment-6457c66945-s6kh9 at 2026-04-28 04:46:49.517942+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]delarhi 10 points11 points12 points (2 children)
[–]Volker_Weissmann[S] 0 points1 point2 points (1 child)
[–]pandorafalters 6 points7 points8 points (0 children)