
Untitled
By: a guest on
Apr 30th, 2012 | syntax:
None | size: 0.50 KB | hits: 12 | expires: Never
How to write 3d mapping in C ?
map<string, int> Employees
Employees[“person1”] = 200;
map<string, string, int> Employees;
Employees[“person1”, “age”] = 200;
map<string, map<string, int> > employees;
employees["person1"]["age"] = 200;
map<pair<string, string>, int> Employees;
Employees[make_pair("person1", "age")] = 200;
#include<map>
#include<tuple>
#include<string>
using namespace std;
map<tuple<string,string>,int> m;
int main(){
m[make_tuple("person1","age")]=33;
}