c++ - Use typdefs of STL classes like map, list etc -


I am programming in an existing project, C ++, and I map the STL sections, set and list multiple times Now I'm interested if there is any way to clear some codes using internal data types. For example:

  std :: map & lt; Uint64_t, std :: list & lt; Int32_t & gt; & Gt; Mymap; // map (std :: map & lt; uint64_t, std :: list & lt; int32_t & gt; :: constiiterator = mymap.begin (); it! = Mymap.end (); it ++) {// Add some to the map for it here iterative here}   

My question is if I std :: map & lt; Uint64_t, std :: list & lt; Int32_t & gt; & Gt; :: const_iterator for example mymap.const_iterator , but does not compile it to bid for G ++:

  Error: Longer unsigned integer of "stud :: map", std :: list & lt; Int, std :: allocator & lt; Int & gt; & Gt;, std :: less & lt; Long unsigned int & gt; std :: allocation & lt; Std :: pair & lt; Long long unsigned construction, std :: list & lt; Int, std :: allocator & lt; Int & gt; & Gt; & Gt; & Gt; & Gt; :: const_iterator   

Any ideas of doing this? Or is it not possible?

  typed std :: map & lt; Uint64_t, std :: list & lt; Int32_t & gt; & Gt; Mymaptype; Mammatipp memp; (Mymaptype :: const_iterator ...    

Comments