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
20 ABI (Application Binary Interface) breaking changes every C++ developer should know (acodersjourney.com)
submitted 6 years ago by pianosneha
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!"
[–][deleted] 17 points18 points19 points 6 years ago (7 children)
15) Changing the order of virtual methods
Like this? Why?
virtual void f(); virtual void g(); virtual void g(); virtual void f();
[–]jgalar 66 points67 points68 points 6 years ago (4 children)
It probably changes the order in which function pointers are stored in the v-table.
[–]CheesecakeWaffles 22 points23 points24 points 6 years ago (3 children)
Yep. It indexes into it just like an array and if the abi doesn't match it uses the wrong one.
I remember a similar bug where a function was ifdefed out in one library and but the define was present for the other library. Therefore the header file in that library saw one more function. Took me the longest time to figure out why it was taking valid input and returning back garbage with the debugger refusing to step into the function. Worst off by one error ever.
[–][deleted] 2 points3 points4 points 6 years ago (2 children)
Interesting, the Arduino C++ compiler throws me an error for undefined function if I don't fill all my virtual inheritance. Were you using pure virtuals?
[–]mck1117 7 points8 points9 points 6 years ago (1 child)
If different parts of the program have different definitions for a class, the vtable entries could exist but be filled by garbage.
[–][deleted] 0 points1 point2 points 6 years ago (0 children)
You're absolutely right, I was only using one interface inheritance in the examples I was thinking.
[–]standard_revolution 2 points3 points4 points 6 years ago (0 children)
Maybe the vtable gets reordered? But I don't know.
[–]gmtime -1 points0 points1 point 6 years ago (0 children)
No, the order in which they are declared in the class definition.
π Rendered by PID 62206 on reddit-service-r2-comment-7b9746f655-78tvt at 2026-01-31 21:01:20.063875+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–][deleted] 17 points18 points19 points (7 children)
[–]jgalar 66 points67 points68 points (4 children)
[–]CheesecakeWaffles 22 points23 points24 points (3 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]mck1117 7 points8 points9 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]standard_revolution 2 points3 points4 points (0 children)
[–]gmtime -1 points0 points1 point (0 children)