I am writing my proprietary class that will store values of a matrix in row-wise order. So the whole data will be stored in a T* data = new[numRows * numCols]; Here is the code