【发布时间】:2022-01-18 13:04:56
【问题描述】:
我正在尝试使用 Xcode 中的函数添加两个数字,但出现此错误:
“控制到达非无效函数的终点”
我的代码是:
#include <stdio.h>
int main()
{
int add();
}
int add()
{
int a,b,c;
printf("Enter The Two Values12");
scanf("%d%d", &a,&b);
c=a+b;
printf("The Sum is = %d", c);
}
【问题讨论】:
-
您遇到的问题比您预期的要多。
标签: c function-call