This question is similar to 4d mapping in C++ with tuple
I have a 5d map that looks like this:
// initialize container, map
map<string, //Car brand
map<int, //Year
map<string, //Car model
map<int, //Car number
double>>>> Car_map; //Price
First I assign a value to the map:
Car_map["BMW"][2010]["3-series"][1] = "100";
Then I want to get the value I assigned to a string:
string Car_map_value= get<0>(Car_map["BMW"][2010].find("3-series")->second[1]);
But when I try to get the value I get this error:
|87|error: no matching function for call to 'get(std::map::mapped_type&)'|
How do I search trough a 5d map in C++?