代码
#include <iostream>
using namespace std;
#include <string>
//函数的的常见延时
//1、无参无反
void test01()
{
cout << "this is test01" << endl;
}
//2、有参无反
void test02(int a)
{
cout << "this is test02 a = "<<a << endl;
}
//3、无参有反
int test03()
{
cout << "this is test03" << endl;
return 30;
}
//4、有参有反
int test04(int a)
{
cout << "this is test04 a = "<<a << endl;
return a;
}
int main()
{
test01();
test02(10);
int num1 = test03();
cout << "num1 = " << num1 << endl;
int num2 = test04(4);
cout << "num2 = " << num2 << endl;
system("pause");
return 0;
}