?? program_6_5.cpp
字號:
// program 6.5: Demonstrate call by reference
#include <iostream>
using namespace std;
void Mystery(int a, int &b) {
cout << "Output at beginning of Mystery" << endl;
cout << "a is " << a << endl;
cout << "b is " << b << endl;
a = 5;
b = 6;
cout << "Output after Mystery assignments" << endl;
cout << "a is " << a << endl;
cout << "b is " << b << endl;
return;
}
int main() {
int i = 10;
int j = 20;
cout << "Output at beginning of main" << endl;
cout << "i is " << i << endl;
cout << "j is " << j << endl;
Mystery(i, j);
cout << "Output after Mystery returns" << endl;
cout << "i is " << i << endl;
cout << "j is " << j << endl;
return 0;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -