#include <bits/stdc++.h> using namespace std; /* 那些参数是地址传递,就在那个变量前加&号 计算时写的是其变量,不加&号*/ int DSWEASDFCSF ( int &a , int b) { int n = a + b ; a = a + 1 ; return n; } int main() { int x,c=3,d=5; //调用DSWEASDFCSF函数,调用时并不写&号 x = DSWEASDFCSF(c,d); cout<<x<<" "<<c; return 0; }
标签:调用,变量,int,传递,地址,DSWEASDFCSF From: https://www.cnblogs.com/hanxuyao/p/17795463.html