标签:c++
引用,r为变量i的引用,引用类型为int:
<span style="white-space:pre"> </span>int i = 0; <span style="white-space:pre"> </span>int &r = i; <span style="white-space:pre"> </span>r = 100;
int i = 42; int *p; int *&r = p; r = &i; *r = 0; cout << "i = " << *r << endl;
标签:c++
原文地址:http://blog.csdn.net/yamingwu/article/details/45897193