按引用传递参数
[cpp]
#include <iostream>
using namespace std;
void sneezy(int &x)
{
x += 20;
}
int main()
{
int times = 20;
sneezy(times);
cout <<times<<endl;
return 0;
}
#include <iostream>
using namespace std;
void sneezy(int &x)
{
x += 20;
}
int main()
{
int times = 20;
sneezy(times);
cout <<times<<endl;
return 0;
}
补充:软件开发 , C++ ,