keil中變量聲明問題及error: #268: declaration may not appear after executable statement in block

在keil中編譯程序時提示:error: #268: declaration may not appear after executable statement in block 錯誤,說是聲明不能在執行語句後,也就是說變量的聲明寫在了使用語句的後面,致使程序在編譯連接時,使用到該變量的語句找不到這個變量,故出錯。 這其實與keil所採用的標準有關,Keil5(版本是5,14.2)默認採用C89標
相關文章
相關標籤/搜索