为您找到"
error C202: 'v': undefined identifier
"相关结果约100,000,000个
No! You don't! You need to define the variable exactly once, and then have a declaration visible wherever the variable is used.. In other words, your project must have one (and only one) definition and may have many declarations. "I need to understand it furthur details later." No; you really need to understand this now - as it is absolutely fundamental & essential to any project using ...
@thebusybee thank you for reaching out. Moving int i; before the for loop worked absolutely fine. I just declared char bin[100] before for loop. There are not errors anymore but strrev is still giving some errors errors. I think that my logic isn't good enough. - Gagandeep Singh
回答 1 已采纳 c51用的是c89标准,变量的定义必须放在所有可执行代码之前,否则定义会被忽略,所以后面提示变量未定义。 把你圈起来的那句放在函数的最前面就可以了。c89以后的标准才允许变量定义在可执行语句之后。
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
#include when i try like this i got that all errors plus 1 warning c318 can't open file 'regx51.h"
Hello I need help on C Program compiler : keil mcu: P89V51R1D2 c program #include #define led P2 void delay_ms (unsigned int i) { unsigned int j = 0; for ( i = 0 ; j
Well, where do you declare P1? The compiler is not a mind reader. You might also try properly formatting your code so that others can read it more easily.
Did you try to include instead of If that fails try defining _LEGACY_HEADERS before including the header file . Tim S.
Microcontroller › 8051 › undefined identifier on KEIL Uvision4 This topic has 1 reply, 2 voices, and was last updated 11 years ago by AJISH ALFRED . Viewing 2 posts - 1 through 2 (of 2 total)
You can no longer post new replies to this discussion. If you have a question you can start a new discussion