|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
谁能帮我找找有什么不对啊!!!
#include <stdio.h>
#include <math.h>
int max<int a,int b>
void main()
{
int x,y,z
int max(int a,int b);
printf("input two numbers:\n");
scanf("%d%d",&x,&y);
z=max(x,y);
printf("maxnum=%d",z);
}
int max(int a,int b);
{
if (a>b)return a;else return b;
}
错误报告是
--------------------Configuration: max - Win32 Debug--------------------
Compiling...
max.c
D:\C++\max\max.c(3) : error C2143: syntax error : missing '{' before '<'
D:\C++\max\max.c(3) : error C2059: syntax error : '<'
D:\C++\max\max.c(15) : error C2449: found '{' at file scope (missing function header?)
D:\C++\max\max.c(17) : error C2059: syntax error : '}'
执行 cl.exe 时出错.
max.exe - 1 error(s), 0 warning(s)
|
|