vc6.0编译出错
#include<stdio.h>#include<math.h>
main()
{
int a,b,c;
scanf("%d,%d",&a,&b);
c=max(a,b);
printf("%d",c);
}
max(int x,int y)
{
int z;
z=x>y?x:y;
return (z);
}
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
F:\学习\我的程序\Cpp1.cpp(7) : error C2065: 'max' : undeclared identifier
F:\学习\我的程序\Cpp1.cpp(9) : warning C4508: 'main' : function should return a value; 'void' return type assumed
F:\学习\我的程序\Cpp1.cpp(11) : error C2373: 'max' : redefinition; different type modifiers
执行 cl.exe 时出错.
Cpp1.obj - 1 error(s), 0 warning(s)
求解决