std::ostream &operator<<(std::ostream &output, Vector &ve) { int *i = ve.v; while (i < ve.v + ve.len) { output << *i; i++; } return output; }
std::istream &operator>>(std::istream &input, Vector &ve) { int *i = ve.v; while (i < ve.v + ve.len) { input >> *i; i++; } return input; }
int &Vector::operator[](int i) { return *(this->v + i); }
intmain(){ int k; cout << "Input the length of Vector A :\n"; cin >> k; Vector A(k); cout << "Input the elements of Vector A :\n"; cin >> A; cout << "Output the elements of Vector A :\n"; cout << A; }