新手有两个问题解决不了 求指点
/* example1.1 calculate the sum of a and b*/#include<stdio.h>
/* This is the main program */
void main()
{
int a,b,sum; /*定义变量*/
a=10;b=24;
sum=add(a,b);
printf("sum=%d\n",sum);
}
/*This function calculates the sum of x and y */
int add(int x,int y)
{ int z;
z=x=y;
return(z);
}
错误提示:error c2065: add : undeclared identifier
error c2373: add : redefinition different type modifiers
该怎么解决 求指教 谢各位