Mega Code Archive
Displaying a Containers Elements on the Standard Output with copy function
#include
#include
#include
#include
#include
using namespace std;
int main( )
{
vector v( 5, 9 );
copy( v.begin(), v.end(), ostream_iterator( cout, " " ) );
copy( v.begin(), v.end(), ostream_iterator( cout, "\n" ) );
}