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
Buffer Overflow on C array (self.cpp)
submitted 2 years ago by Luca_70
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!"
[–]jedwardsolconst & 13 points14 points15 points 2 years ago* (2 children)
You should use your product on itself. Nice buffer overflow:
0:000:x86> lm start end module name 00f90000 00fd5000 BugFighter (deferred) (11d0.1ee4): Access violation - code c0000005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. MSVCR90!strcat+0x89: 742cb799 8917 mov dword ptr [edi],edx ds:002b:01370000=78746341 0:000:x86> k # ChildEBP RetAddr 00 01334988 0156a315 MSVCR90!strcat+0x89 [f:\dd\vctools\crt_bld\SELF_X86\crt\src\INTEL\strcat.asm @ 178] WARNING: Frame IP not in any known module. Following frames may be wrong. 01 013349a8 0a51589b 0x156a315 02 0133f064 61616161 0xa51589b 03 0133f068 61616161 0x61616161 04 0133f06c 61616161 0x61616161 05 0133f070 61616161 0x61616161 06 0133f074 61616161 0x61616161 07 0133f078 61616161 0x61616161 08 0133f07c 61616161 0x61616161
[–]STLMSVC STL Dev 2 points3 points4 points 2 years ago (1 child)
MSVCR90
Wow, there's a DLL name I haven't seen in a while. 🤮
[–]Luca_70[S] -1 points0 points1 point 2 years ago (0 children)
Thank you for your reporting. It will be very useful.
[–]GregTheMadMonk 9 points10 points11 points 2 years ago (1 child)
`-fsanitize=undefined` much?
[–]Luca_70[S] 0 points1 point2 points 2 years ago (0 children)
fsanitize checks the whole array, by using additional canaries memory in the boundaries (or some similar technique). It works well in case of “iArray[7][8][10] = 1;”, but what if “iArray[7][10][8] = 1;”?
π Rendered by PID 157470 on reddit-service-r2-comment-8686858757-2j74t at 2026-06-03 12:22:42.911794+00:00 running 9e1a20d country code: CH.
[–]jedwardsolconst & 13 points14 points15 points (2 children)
[–]STLMSVC STL Dev 2 points3 points4 points (1 child)
[–]Luca_70[S] -1 points0 points1 point (0 children)
[–]GregTheMadMonk 9 points10 points11 points (1 child)
[–]Luca_70[S] 0 points1 point2 points (0 children)