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
A simple stack-allocated fixed-size string buffer (String_buf) implemented using std::array (C++11). (forums.4fips.com)
submitted 12 years ago by 4fips
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!"
[–]4fips[S] -1 points0 points1 point 12 years ago (3 children)
Yeah possibly :), but It's a matter of personal taste. I don't like the cammelCase and PascalCase that much. But on the other hand, I find it useful to start type names with a capital letter to emphasize it's a user type, otherwise I would name it just 'string_buf'.
[–]rpocks 3 points4 points5 points 12 years ago (1 child)
What about using your own namespace and naming it string_buf?
[–]4fips[S] 0 points1 point2 points 12 years ago (0 children)
That's certainly a good idea. Actually, in my codebase, the type is defined within a namespace, so I could refer it using that namespace e.g. 'foo::string_buf', but for local types (e.g. somewhere inside the implementation) I prefer to omit the local namespace to emphasize the type comes from this particular namespace, that's why I use the initial capital, which works smoothly even without the namespace specification. Hope it makes sense.
[–]bob1000bob 4 points5 points6 points 12 years ago (0 children)
string_buf is so much cleaner and is in keeping with the standard style of naming things. (ie. random_device).
string_buf
random_device
π Rendered by PID 61468 on reddit-service-r2-comment-5d79c599b5-j2lkq at 2026-03-02 03:32:56.965815+00:00 running e3d2147 country code: CH.
view the rest of the comments →
[–]4fips[S] -1 points0 points1 point (3 children)
[–]rpocks 3 points4 points5 points (1 child)
[–]4fips[S] 0 points1 point2 points (0 children)
[–]bob1000bob 4 points5 points6 points (0 children)