c语言redefinition; different basic types错误(只有8行)
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/07/05 10:04:28
c语言redefinition; different basic types错误(只有8行)
#include
void asd(){
er();
}
void er(int b){
printf("er");
}
void main(){asd();}
编译后报错:test.c(6) :error C2371:'er' :redefinition; different basic types
#include
void asd(){
er();
}
void er(int b){
printf("er");
}
void main(){asd();}
编译后报错:test.c(6) :error C2371:'er' :redefinition; different basic types
在C++标准的编译器中,还会报er未定义的错误,下面来分析一下C语言编译器的解释:
首先,在asd函数中调用了er函数,而编译器之前并为看到有该函数的定义,因此编译器进行了一个隐含的函数原型解释,即int er(),到之后的er函数定义时,编译器发现同之前的隐含的原型不匹配,因此出错.
首先,在asd函数中调用了er函数,而编译器之前并为看到有该函数的定义,因此编译器进行了一个隐含的函数原型解释,即int er(),到之后的er函数定义时,编译器发现同之前的隐含的原型不匹配,因此出错.
c语言redefinition; different basic types错误(只有8行)
redefinition; different basic types
different types
(Two basic types of carbohydrate,the simple carb,) identifie
C语言和BASIC语言的区别?
parameter 1:different types
different types of accommodation
There are basically ()different types of MP.
three basic types of static stresses
英语翻译Different types of mediaThere are different types of med
Different types of ice cream
c235:parameter 1:different types