#include using namespace std; class Vector { float v[3]; public: float & operator [](int i) { return this->v[i]; } const float & operator [](int i) const { return this->v[i]; } }; class Matrix { Vector row[3]; public: float & operator ()(int r, int c) { return this->row[r][c]; } }; int main(void) { Vector v; Matrix m; v[0] = 1.01; m(0,0) = 2.03; cout << v[0] << endl; cout << m(0,0); return 0; }