原文链接:http://www.juzicode.com/archives/3064
错误提示:
为变量a赋值时提示:[Error] ‘a’ undeclared (first use in this function)
//juzicode.com;vx:桔子code
#include <stdio.h>
int main(void)
{
a = 10;
printf("a=%d",a);
return 0;
}

可能原因:
1、变量a在使用前没有定义其类型。
解决方法:
1、在a=10语句前先定义a的类型。
//juzicode.com;vx:桔子code
#include <stdio.h>
int main(void)
{
int a; //先定义a的类型
a = 10;
printf("a=%d",a);
return 0;
}
关注微信公众号:“桔子code”,欢迎后台留言撩我,我会尽我所能为你解惑Python,C等编程知识
