Wednesday, December 22, 2004

STL - Foreach style loop for map

map< string, double > token_data;


for ( map< string, double >::iterator im = token_data.begin(); im != token_data.end(); ++im )

cout << "\"" << im->first << "\" = " << im->second << endl;

0 Comments:

Post a Comment

<< Home