j riv
j riv

Reputation: 3699

MS C Compiler requires declarations of variables to be at the beginning of a function. Is that supported by the standard?

A common error is

'var' : illegal use of this type as an expression

Upvotes: 2

Views: 65

Answers (1)

Jens Gustedt
Jens Gustedt

Reputation: 79003

this is C89. in C99 you may declare them anywhere.

Upvotes: 4

Related Questions