#include #include #include "Vector.h" int main() { Vector bv(5), b2; b2 = bv; bv[0] = 3; bv[1] = 33; bv[2] = 13; bv[3] = 6; bv[4] = 373; copy(bv.begin(), bv.end(), ostream_iterator(cout, " ")); cout << '\n'; Vector::reverse_iterator rit = bv.rbegin(); while (rit != bv.rend()) cout << *rit++ << ", "; cout << '\n'; bv.push_back(12); bv.push_back(5); copy(bv.begin(), bv.end(), ostream_iterator(cout, " ")); cout << '\n'; bv.sort(); copy(bv.begin(), bv.end(), ostream_iterator(cout, " ")); cout << "bv has " << bv.size() << " elements\n"; Vector bstr; bstr.push_back("bravo"); bstr.push_back("delta"); bstr.push_back("foxtrot"); bstr.push_back("echo"); bstr.push_back("charley"); bstr.push_back("alpha"); bstr.sort(); copy(bstr.begin(), bstr.end(), ostream_iterator(cout, " ")); cout << '\n'; }