`

【002】函数调用

阅读更多

#include <iostream>
using namespace std;


void test2();

 

int main()
{

    test2();

    return 0;
}

 

void test2()
{
    int slen = 0;

    printf("hello world%d", slen);

}

 

说明:

在c语言中,程序总是从main方法开始运行;

在调用test2方法时,需要首先定义test2方法。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics