fork(1) download
  1. float energycalc(float J, int m[][col], int row, int col){
  2. return 1.0f;
  3. }
  4.  
  5. int main(void){
  6. int row = 3, col = 5;
  7. int m[row][col];
  8. energycalc(1.0f, m, row, col);
  9. return 0;
  10.  
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
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);
                   ^
stdout
Standard output is empty