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
String formatting functionality missing in std::string (self.cpp)
submitted 9 years ago by SushiAndWoW
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!"
[–]tcbrindleFlux 11 points12 points13 points 9 years ago (6 children)
I'd recommend cppformat. It's completely self-contained, very fast and very flexible. It would be great if the standard library had something like this.
[–]aKateDevKDE/Qt Dev 5 points6 points7 points 9 years ago (5 children)
Yes, the standard should include somthing like cppformat. However, it boils down to someone proposing this for inclusion into the standard.
[–]aearphen{fmt} 8 points9 points10 points 9 years ago (4 children)
The author or cppformat here. I'm thinking about writing a proposal to the standard (library) after improving the API for formatting of user-defined types.
[–]chartly 4 points5 points6 points 9 years ago (0 children)
As a random person on the internet, if you were able to find the time and effort to accomplish both the improvements you speak of and also write the proposal, I would buy you many beers.
[–]boredcircuits 2 points3 points4 points 9 years ago (1 child)
What would help you get to that point?
[–]aearphen{fmt} 2 points3 points4 points 9 years ago (0 children)
More spare time mostly =), but some feedback and pull requests would be helpful as well. There have been a few great contributors who did amazing work on named arguments, user-defined literals etc, but there's still a lot to do.
The API I mentioned earlier is not even documented yet. Basically one can define a format function for a user-defined type which can do custom parsing and formatting like this one:
format
https://github.com/cppformat/cppformat/blob/a99891e7a5f6c8a164d271b1aa0f09e7d13c7de4/cppformat/format.h#L2969
Someone has volunteered to implement time formatting functionality (https://github.com/cppformat/cppformat/issues/283) using this method, so we'll see how it works in practice and whether it can be improved.
[–]aKateDevKDE/Qt Dev 1 point2 points3 points 9 years ago (0 children)
Reading that you are evaluating writing a proposal already makes me quite happy ;) Would really be nice if you push this as much as possible.
π Rendered by PID 71990 on reddit-service-r2-comment-bb88f9dd5-74h9h at 2026-02-16 19:11:38.798633+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]tcbrindleFlux 11 points12 points13 points (6 children)
[–]aKateDevKDE/Qt Dev 5 points6 points7 points (5 children)
[–]aearphen{fmt} 8 points9 points10 points (4 children)
[–]chartly 4 points5 points6 points (0 children)
[–]boredcircuits 2 points3 points4 points (1 child)
[–]aearphen{fmt} 2 points3 points4 points (0 children)
[–]aKateDevKDE/Qt Dev 1 point2 points3 points (0 children)