#include<stdio.h>
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; }
有帮助的话采纳一下哦!
报告相同问题?