解决Codex CLI中TLS连接中断问题的全面指南
2026/7/22 6:26:27
type of ‘n’ defaults to ‘int’ [-Wimplicit-int]
#include<stdio.h> #include<string.h> int fun(int n) { //第一层:5*fun(4) //第二层:4*fun(3) //第三层:3*fun(2) //第四层:2*fun(1) //第五层:return 1 if(n==1) { return 1; } else if(n>1) { return n*fun(n-1); } } int main(int argc, char const *argv[]) { //函数递归 int n=fun(5); printf("%d\n",n); return 0; }原因:int fun(n)函数参数类型,没有加类型定义,应该是int fun(int n)