#include #include #include using namespace std; int main() { const int a[] = {10, 20, 30}; const size_t n = sizeof a / sizeof a[0]; vector v(a, a + n); //born containing 10, 20, 30 const vector::size_type s = v.size(); cout << "size == " << s << "\n\n"; for (vector::size_type i = 0; i < s; ++i) { cout << v[i] << "\n"; //cout << v.operator[](i) << "\n"; } cout << "\n"; for (vector::iterator it = v.begin(); operator!=(it, v.end()); it.operator++()) { cout << it.operator*() << "\n"; } cout << "\n"; for (vector::iterator it = v.begin(); it != v.end(); ++it) { cout << *it << "\n"; } cout << "\n"; return EXIT_SUCCESS; }