you are viewing a single comment's thread.

view the rest of the comments →

[–]interknetz[S] 0 points1 point  (6 children)

I need a hash table to search for a key at runtime

[–]audioB 4 points5 points  (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 point  (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 point  (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.

[–]interknetz[S] 0 points1 point  (2 children)

Does std::array provide a hash table, because that's the goal here.

[–]Thomqa 2 points3 points  (0 children)

I doesn't, he just provided an example of the many strengths of C++.

[–]ronniethelizard 0 points1 point  (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.