main.c(53): error: #268: declaration may not appear after executable statement in block

This problem is encountered when compiling the STM32 program. The reason for this error is that the declaration of the variable cannot be placed after the executable statement, and the variable must be declared at the beginning of the main function. When declaring a variable in a program, it needs to be declared before the executable statement, otherwise the above error will occur.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324645089&siteId=291194637