Given your question, you should be using unordered_map
, which is standard in C++ 11 and very common in previous implementations. If performance is not too important (or the maps really small) you can also use map
. Then you can do this:
using namespace std;
unordered_map<string, unordered_map<string, string> > dict;
After, it's a question of parsing your CSV file ...