Syntax error : missing ';' before 'type'

后端 未结 2 1092
野性不改
野性不改 2020-12-30 21:56

So i have this error:

Error 3 error C2143: syntax error : missing \';\' before \'type\' g:\\lel\\tommy\\tommy\\tommy.c 34 tommy

2条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-30 22:32

    Are you compiling with c99 or c89?

    The error appears to be because you are defining a variable within the body of the function (allowed in c99 not c89). Move double *ptr to the beginning of the function and then just assign ptr = mat->matrix; where the error now is.

提交回复
热议问题