float energycalc(float J, int m[][col], int row, int col){ return 1.0f;} int main(void){ int row = 3, col = 5; int m[row][col]; energycalc(1.0f, m, row, col); return 0; }
Standard input is empty
prog.c:1:35: error: 'col' undeclared here (not in a function) float energycalc(float J, int m[][col], int row, int col){ ^ prog.c: In function 'main': prog.c:8:19: error: type of formal parameter 2 is incomplete energycalc(1.0f, m, row, col); ^
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!