// @topic T53305 12/11/2012 -- STL containers and iterators // @brief std::vector, std::stringstream, converting int to string #include <string> #include <iostream> #include <vector> #include <sstream> int main() { std::vector< std::string > vect; int number = 0; for ( ; number < 6; ++number ) { // convert int to string std::stringstream buffer; buffer << number; std::string str_number; buffer >> str_number; vect.push_back( "<<<"+str_number+">>>" ); } for ( number = 0; number < vect.size(); ++number ) { std::cout << vect[ number ] << "\n"; } }