0

int m, n; cin>>m>>n; double ** T = new double*[n]; for(int i=0; i<m; i++){ï»ż T[i] = new double[m]; }

how to declare a allocatable matrix!

4th Nov 2016, 11:49 PM
mohammad hatami
mohammad hatami - avatar
1 Answer
0
int main() { int m,n; cin>>m>>n; int **a = new int*[m]; for(int i=0;i<m;i++){ a[i] = new int[n]; } } you have done it the correct way.
5th Nov 2016, 2:20 AM
kamal joshi
kamal joshi - avatar