[Solved] Dev-C++ [Error] ‘for‘ loop initial declarations are only allowed in C99 or C11 mode

When writing C language program with DEV-C + +:

[Error] ‘for’ loop initial declarations are only allowed in C99 or C11 mode

Variables declared in the for loop are only allowed in C99 or C11 mode. You need to select C99 in the language standard under tools/compiler option/code generation.

The results are as follows:


Read More: