/**************************************************************** **** **** This file belongs with the course **** Introduction to Scientific Programming in C++/Fortran2003 **** copyright 2016-2021 Victor Eijkhout eijkhout@tacc.utexas.edu **** **** array.cxx : basic array stuff **** ****************************************************************/ #include using std::cin, std::cout; #include using std::vector; class array_object { vector vec; public: array_object(int n) { vec = vector(n); }; int size() { return vec.size(); }; }; int main() { vectorxinit(5,3); cout << "array has been initialized to " << xinit.at(2) << '\n'; vectorx(5); cout << x.size() << '\n'; array_object obj(7); cout << obj.size() << '\n'; return 0; }