我期望 b 的值低于 100,但我得到 12。为什么会这样?显然,我的c = b
行没有将 c 指定为 b 的别名?
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int a = 4;
int b = 12;
int& c = a;
c = 8;
cout << a << endl;
c = b;
c = 100;
cout << b << endl;
int bb;
cin >> bb;
return 0;
}