请教各位如下的程序: #include<stdio.h>
int main()
{ char c1;
for(;(c1=getchar())!='\n';)
printf("%c",c1);
return 0;
}
为何在VC 下在建立可执行文件时出错了,显示为one or more multiply defined symbols found
可我觉得仅定义的c1为字符型,没有多定义啊,为什么出现这中错误。
注:本程序在lcc中运行无错,这是否与vc的运行环境有关啊?
int main()
{ char c1;
for(;(c1=getchar())!='\n';)
printf("%c",c1);
return 0;
}
为何在VC 下在建立可执行文件时出错了,显示为one or more multiply defined symbols found
可我觉得仅定义的c1为字符型,没有多定义啊,为什么出现这中错误。
注:本程序在lcc中运行无错,这是否与vc的运行环境有关啊?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货