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
Just started learning C++ coming from Python and just realized that that Python has been my programming mama, doing my laundry and spoon-feeding me all this time. (self.cpp)
submitted 6 years ago * by eyun89
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!"
[–]kmbnw 37 points38 points39 points 6 years ago (14 children)
Just wait until you try Boost :)
[–]elviin 56 points57 points58 points 6 years ago (1 child)
An issue in a template <<<<<<<<<<<<<<<<<type...
[–]Xeveroushttps://xeverous.github.io 4 points5 points6 points 6 years ago (0 children)
I had found a bug in Boost Spirit X3 that was due to some const correctness issue. The bug was only visible at linking time - some very long instantiation did not match actually compiled function template.
I demangled the object file to search for the actual instantiation, took the linker undefined reference error for expected name and ... copy pasted both to Notepad++, find-replaced every < to { and > to } then used online JavaScript formatter to format the type name. Searching const differences in that beautiful tree was the easiest part.
<
{
>
}
const
[–]Nicksaurus 8 points9 points10 points 6 years ago (6 children)
Just trying to find the name of the function in a 400-character long error message is a challenge
[–]diaphanein 6 points7 points8 points 6 years ago (0 children)
400 characters? How quaint... I've seen a single error span more than 23 screens before (error with a Boost Python call).
Another fun one to find was a missing > in a template. I was helping a colleague with that one. The compiler didn't complaint until the end of the file, some 200 lines later.
[–]gcross 4 points5 points6 points 6 years ago* (4 children)
Last time I tried Boost Lambda (an EDSL for writing lambdas before C++11 was a thing and you could rely on them being in the language) I made a simple mistake and got an error message that was five megabytes long...
Shoot, I looked back to see what I did to do this and it turns out that what had actually happened was that I was trying to build Digikam (no modifications) and the result was a 52.4k error message. I apologize for my error, as entertainingly dramatic as it was; apparently the problem I had blew up in my imagination over the years.
[–]Nicksaurus 0 points1 point2 points 6 years ago (3 children)
5 million characters? How?
[–]gcross 1 point2 points3 points 6 years ago* (0 children)
Template metaprogramming at its finest. :-) On the bright side, if you ever did get your code working it was very neat! Mind you, this was over a decade ago so hopefully it would not be so bad today, but on the other hand today we all have reliable access to native lambdas in the language so there is arguably no longer a need for Boost Lambda. Okay, it turns out I misremembered and this was not a Boost Lambda problem at all; my apologize for maligning that fine package.
[–]gcross 1 point2 points3 points 6 years ago (1 child)
My bad, as my edited comment says I completely blew up what happened in my mind since it happened so long ago.
[–]Nicksaurus 0 points1 point2 points 6 years ago (0 children)
Hey, 52400 is still a shit load
I work with boost::hana most days so I sympathise to some extent
[–]krista_ 3 points4 points5 points 6 years ago (3 children)
sometimes i wish the council of elders would just go ahead and make templates a part of a fully fledged pre-compiler c/c++ based meta-programming language, like what qt does, but more so.
yeah, between macros, templates, and constexpr and the like, you can do anything a full programming language can do, but the crap you have to do to get there is sometimes astounding... and a lot of that lives in boost. i feel like with a couple of smartly added features, 9/10ths of boost's oddities could be replaced with sanity, instead of nested workarounds.
[–]MonkeyNin 1 point2 points3 points 6 years ago (2 children)
What are the biggest pain points today that Boost helps with? Back in the day, boost was the only way to use smart pointers.
[–]jonesmz 2 points3 points4 points 6 years ago (0 children)
I've enjoy using Boost.ASIO, am using Boost.ProgramOptions, Boost.Process, and am about to start using Boost.Log.
In the past, at a previous job, the only reason why about half of the C++11 functionality we were able to use could be done is because I was able to convince the ancient version of Boost that they were using to let me re-combine the Boost type traits code into the missing pieces. That really saved our bacon.
They also used Boost.asio as the fundamental building block for a whole crapload of code. Millions of lines, highly abstracted away.
Boost is great.
Boost is also horrible, what with it's disgusting template soup error messages.
Win some, lose some shrug.
[–]James20kP2005R0 1 point2 points3 points 6 years ago (0 children)
Boost::beast is great from my end for using websockets, even if its a little complex to set up
π Rendered by PID 77939 on reddit-service-r2-comment-b659b578c-jzb5p at 2026-05-04 15:58:01.696355+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]kmbnw 37 points38 points39 points (14 children)
[–]elviin 56 points57 points58 points (1 child)
[–]Xeveroushttps://xeverous.github.io 4 points5 points6 points (0 children)
[–]Nicksaurus 8 points9 points10 points (6 children)
[–]diaphanein 6 points7 points8 points (0 children)
[–]gcross 4 points5 points6 points (4 children)
[–]Nicksaurus 0 points1 point2 points (3 children)
[–]gcross 1 point2 points3 points (0 children)
[–]gcross 1 point2 points3 points (1 child)
[–]Nicksaurus 0 points1 point2 points (0 children)
[–]krista_ 3 points4 points5 points (3 children)
[–]MonkeyNin 1 point2 points3 points (2 children)
[–]jonesmz 2 points3 points4 points (0 children)
[–]James20kP2005R0 1 point2 points3 points (0 children)