#include
#include
#include
struct TEST {
int x;
int y;
};
int main()
{
std::vector str;
std::vector< std::vector > s;
str.push_back( "a" );
str.push_back( "b" );
s.push_back( str );
str.clear();
str.push_back( "c" );
str.push_back( "d" );
s.push_back( str );
std::vector >::iterator i;
for ( i = s.begin(); i != s.end(); i++ )
{
std::vector::iterator ii;
for ( ii = i->begin(); ii != i->end(); ii++ )
{
std::cout << *ii << "\t";
}
std::cout << std::endl;
}
return 0;
}
$ g++ test.cpp
$ ./a.out
a b
c d
阅读(1515) | 评论(0) | 转发(0) |