?? reference.cpp
字號:
//reference.cpp
#include <iostream.h> //cout
#include <conio.h> //getch()
void main()
{ int mother; //變量
int &mami=mother; //與mother同地址
int &woman=mami; //與mother同地址
mother = 36;
cout << "mami =" << mami << endl;
cout << "woman=" << woman << endl;
cout << "mother="<< mother << endl;
cout << " mami 加1后:\n";
mami++;
cout << "mami =" << mami << endl;
cout << "woman=" << woman << endl;
cout << "mother="<< mother << endl;
cout << " address as followings:\n";
cout << "mother : " << hex << &mother << endl;
cout << "mami : " << &mami << endl;
cout << "woman : " << &woman << endl;
getch();
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -