main函数调用自身

来源:互联网 发布:错误的数据统计 编辑:程序博客网 时间:2024/05/17 23:57

据说,C里面可以有如下使用,但是C++中已经定义不可以递归main函数。

int main(){    static int count = 0;    count++;    printf("%d\n", count);    if (count < 10) return main();    else return 0;}
原创粉丝点击