I wrote a program to calculate the tranpose of a matrix. The declaration part of my code is
I didnt want to use fixed integers in the arrays because I wanted the user to specify the order of the matrix.
int m, n; //m is the number of rows of the array and n is the number of columns of the array
printf("What is the order of the matrix. Input number of ROWS and COLUMNS: ");
The program worked well in CodeBlocks 10.05 which is the IDE I use, but when I tried to run it in Turbo C++, the program gave me an error, "Constant Expression required in function main" and the int number[m][n] line was highlighted.
Can anybody kindly explain to me why the program didnt run in Turbo C++ but worked in CodeBlocks.
I'm new to C programming, just over a month old. Thank you!