#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int main()
{vector v(10);
generate(v.begin(), v.end(), rand);
copy(v.begin(), v.end(),ostream_iterator (cout, "\n"));
return 0;
}
Friday, July 13, 2007
Simple container dump using STL iterator
Quick and dirty printing of containers contents in C++ using STL ostream_iterator ...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment