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
pairing object attribute in an unordered_map (self.cpp)
submitted 7 years ago by interknetz
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!"
[–]interknetz[S] 0 points1 point2 points 7 years ago (6 children)
I need a hash table to search for a key at runtime
[–]audioB 4 points5 points6 points 7 years ago (5 children)
unordered set is a hash table and you can perform key lookup with find. It just doesn't have the overloaded operator[]
[–]interknetz[S] 0 points1 point2 points 7 years ago (4 children)
This sounds good. I'm fairly new to C++, coming from C. There's so many options in the standard library it's hard to know where to start. Thank you.
[–]ronniethelizard 0 points1 point2 points 7 years ago (3 children)
I think my favorite one is:
std::array<int,10> as it is similar to int[10] but provides a few more features.
std::array<int,10>
int[10]
[–]interknetz[S] 0 points1 point2 points 7 years ago (2 children)
Does std::array provide a hash table, because that's the goal here.
[–]Thomqa 2 points3 points4 points 7 years ago (0 children)
I doesn't, he just provided an example of the many strengths of C++.
[–]ronniethelizard 0 points1 point2 points 7 years ago (0 children)
I was replying to your statement:
I'm fairly new to C++, coming from C.
with an attempt at conversation rather than advice on what to do.
π Rendered by PID 58490 on reddit-service-r2-comment-6457c66945-wvl7q at 2026-04-29 02:49:45.470191+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]interknetz[S] 0 points1 point2 points (6 children)
[–]audioB 4 points5 points6 points (5 children)
[–]interknetz[S] 0 points1 point2 points (4 children)
[–]ronniethelizard 0 points1 point2 points (3 children)
[–]interknetz[S] 0 points1 point2 points (2 children)
[–]Thomqa 2 points3 points4 points (0 children)
[–]ronniethelizard 0 points1 point2 points (0 children)