Mega Code Archive
Categories
/
C++
/
String
Output a string with copy function
#include
#include
#include
#include
#include
using namespace std; int main( ) { string s( "this is a test." ); cout << s << endl; copy( s.begin(), s.end(), ostream_iterator
( cout, " " ) ); }