请问我这是哪里错了????
#include <stdio.h>main()
{
int a,b;
scanf("%d,%d",&a,&b);
max=(a,b);
printf("最大值=%d",max);
return 0;
}
int max(int x,int y)
{int z;
if(x>=y)z=x;
else z=y;
return(z);
}
这是一个求最大值的简单编程。但是到底是哪里错了???大虾们
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
C:\Users\FLY\Desktop\Cpp1.cpp(6) : error C2065: 'max' : undeclared identifier
C:\Users\FLY\Desktop\Cpp1.cpp(11) : error C2373: 'max' : redefinition; different type modifiers
Ö´ÐÐ cl.exe ʱ³ö´í.
Cpp1.obj - 1 error(s), 0 warning(s)
[ 本帖最后由 qqoo6789 于 2013-7-11 22:52 编辑 ]