#include
int main()
{
int max(int x, int y);
int a,b,c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("max= %d\n",c);
return 0;
}
这个为什么运行的时候显示“undefined reference to 'max'”,大佬求救
你的max函数没有定义吧?
#include <stdio.h>
int main(){
int max(int a,int b);
int a,b,c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("max= %d\n",c);
return 0;
}
int max(int a,int b){
return a>b? a:b;
}
有帮助的话采纳一下哦!
不知道你这个问题是否已经解决, 如果还没有解决的话: