yleemci
11-08-2009, 02:16 AM
I am not sure why value_type is needed for map object. operator [] can be used to populate a map.
map <int, int> mInt;
mInt.insert ( map <int, int> :: value_type ( 1, 10 ) );
mInt[ 1 ] = 10;;
map <int, int> mInt;
mInt.insert ( map <int, int> :: value_type ( 1, 10 ) );
mInt[ 1 ] = 10;;