Two Dimensional Array Simulation Using One Vector Object
To simulate a Matrix class with M*N elements, initialize a vector withM*N elements and overload the () operator such that Foo(i,j) returnsFoo[i-1+M*(j-1)]. This way Foo(1,1) is equivalent to Foo[0], Foo(2,1)