#include <iostream>
using namespace std;
void init(int &a){
	a=2;
}
int main()
{

  int a=3;
  init(a);
  cout<<a<<endl;
    return 0;
}

output:

2

版权声明:本文为博主原创文章,未经博主允许不得转载。

相关文章:

  • 2022-01-07
  • 2022-12-23
  • 2021-09-14
  • 2021-05-14
  • 2022-12-23
  • 2021-05-19
  • 2021-09-26
  • 2021-08-26
猜你喜欢
  • 2022-01-18
  • 2021-08-03
  • 2021-10-23
  • 2021-04-03
  • 2022-02-22
  • 2022-12-23
  • 2021-12-19
相关资源
相似解决方案