为什么这样打会报错啊

来源:百度知道 编辑:UC知道 时间:2024/06/18 12:46:45
为什么这样打会报错啊
悬赏分:0 - 离问题结束还有 14 天 23 小时
#include "stdio.h"

int main()
{
printf("%d\n",eof);
return 0;
}
错误是("%d\n",eof)的d上,d 有错吗

eof没有定义......先定义一下...
#include "stdio.h"

int main()
{
int eof = 2;
printf("%d\n",eof);
return 0;
}

d和d不一样,你可以仔细观察大小!祝你成功^_^

后面加上&
printf("%d\n",&eof);

变量eod都没定义啊,也没有赋值,它怎么可以输出呢,声明和赋值一下就好了

加上#include "io.h"
是不是就成功了呢?