Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 30th, 2012  |  syntax: None  |  size: 0.50 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. How to write 3d mapping in C  ?
  2. map<string, int> Employees
  3. Employees[“person1”] = 200;
  4.        
  5. map<string, string, int> Employees;
  6. Employees[“person1”, “age”] = 200;
  7.        
  8. map<string, map<string, int> > employees;
  9. employees["person1"]["age"] = 200;
  10.        
  11. map<pair<string, string>, int> Employees;
  12. Employees[make_pair("person1", "age")] = 200;
  13.        
  14. #include<map>
  15. #include<tuple>
  16. #include<string>
  17. using namespace std;
  18. map<tuple<string,string>,int> m;
  19. int main(){
  20.     m[make_tuple("person1","age")]=33;
  21. }