2000-12-05 Benjamin Kosnik <bkoz@haight.redhat.com>
[official-gcc.git] / libstdc++ / tests / tvector.cc
blobef238ef52da524ae3f445dfef7c883998d987fc3
1 #include <vector.h>
2 #include <iostream.h>
3 #include <algo.h>
5 main ()
7 cout << "Fill of C array:\n";
8 char x[50];
9 fill (x, x+50, '/');
10 fill (x+1, x+49, '*');
11 copy (x, x+50, ostream_iterator<char>(cout));
13 cout << "\nFill of vector<char>:\n";
15 vector<char> cvec;
16 cvec.insert (cvec.begin(), 50, '/');
17 fill (cvec.begin()+1, cvec.end()-1, '-');
18 copy (cvec.begin(), cvec.end(), ostream_iterator<char>(cout));
19 cout << endl;