c++引用

 1 #include <iostream>
 2 using namespace std;
 3 
 4 int &gg(int b[10], int a[10]){
 5     for(int i=0; i<10; i++){
 6         b[i]=a[i];
 7     }
 8 }
 9 
10 int main(void){
11     int b[10], a[10];
12     for(int i=0; i<10; i++){
13         a[i]=i;
14     }
15     gg(b, a);
16     for(int i=0; i<10; i++){
17         cout << b[i] << " ";
18     }
19     cout << endl;
20     return 0;
21 }
原文地址:https://www.cnblogs.com/geloutingyu/p/6618326.html