cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How to make a map with two keys?
How to make a map with two keys?
Feb 3, 2014 at 6:59pm UTC
Malaxiz
(24)
I want to be able to search for just one key, like this:
Sprite.at[
"Stone"
] == Sprite.at[0]
Sprite.at[
"Grass"
] == Sprite.at[1]
Is this possible, or should I be using another method?
Feb 3, 2014 at 7:13pm UTC
Cubbi
(4774)
boost has multi-index containers (
http://www.boost.org/doc/libs/release/libs/multi_index/doc/index.html
), or you could put one together yourself
Feb 3, 2014 at 11:17pm UTC
Smac89
(1727)
have you tried std::map(tree) or std::unordered_map(hashmap)?
http://www.cplusplus.com/reference/map/map/
http://www.cplusplus.com/reference/unordered_map/unordered_map/
Topic archived. No new replies allowed.