missing function header (old-style formal list?)的错误
VC++6中:// 1.cpp : Defines the entry point for the console application.
//
#include "stdafx.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);
print("maxmum=%d",z);
}
int max(int a,int b);
{
if(a>b)return a; else return b;
}
运行后出现错误:
:\C语言文件夹\1\1.cpp(12) : error C2065: 'print' : undeclared identifier
E:\C语言文件夹\1\1.cpp(15) : error C2447: missing function header (old-style formal list?)
执行 cl.exe 时出错.
请各位帮忙解释一下。谢谢。