   c++ hash_map help
  Could someone tell me the right way to do this in VS 2008?stdext::hash_map <const char*, Node*> lookup;string s = "test";lookup[s.c_str()] = new Node;string s2 = "test";cout<<lookup[s2.c_str()]->number<<endl; // gets access violation exceptionI've looked online and found a couple ways to make hash_maps take string keys but always get some compilation error.   
  Hashing on an address is not really a good idea. Addresses change. Every call to std::string::c_str() might give you a different address, even for the same std::string.Why not just just std::string as your key?   ;  ... what the hellthat was the FIRST thing I tried and it didn't work so I spent like an hour trying different things. now I try it again and it works this time. well thanks for the advice   