I am facing problem in allocating matrix using vector library globally. However, in my code, I am allocating vector as an array, which you can see below.
matrix = new double*[row*col];
for (int i = 0; i < row*col; i++){
Matrix[i] = new double[col];
}
Please suggest a possible way to allocate matrix globally (preferably using build-in vector or user classes)
matrix = new double*[row*col];
for (int i = 0; i < row*col; i++){
Matrix[i] = new double[col];
}