69,368
社区成员
发帖
与我相关
我的任务
分享
#include <stdio.h>
#include <stdlib.h>
int add(int x,int y=100);
void main(void)
{
int a,b,c;
a = 1000;
b = 20;
c = add(a);
printf("%d\n",c);
}
int add(int x,int y)
{
return (x+y);
}
G:\VC_Program\practice&example\Text2.c(3) : error C2143: syntax error : missing ')' before '='
G:\VC_Program\practice&example\Text2.c(3) : error C2072: 'add' : initialization of a function
G:\VC_Program\practice&example\Text2.c(3) : error C2059: syntax error : ')'
G:\VC_Program\practice&example\Text2.c(9) : error C2198: 'add' : too few actual parameters
Error executing cl.exe.