C++ main.cpp 文件中 函数与函数之间的调用
#include <iostream>
using namespace std;
int main()
{
void demo_1_caLL_demo2(int s); //声明 定义的函数
demo_1_caLL_demo2(20); //使用 已经声明且定义过的函数
return 0; //结束
}
//方法 1 调用方法 2
void demo_1_caLL_demo2(int dm){
void demo_2(); //首先声明函数 下面调用
if (dm >10){
demo_2();
}
}
// 方法 2
void demo_2(){
//暑如果被调用输出
string str = "hello";
cout <<"outcome is ->>>"<<str <<endl;
}