c++ get the pointer from the reference

int x = 5;
int& y = x;
int* xp = &x;
int* yp = &y;


xp is equal to yp.

也就是说,直接对reference取地址就可以了。
posted @ 2017-03-13 12:41  PhoenixTree(梧桐树)  阅读(195)  评论(0编辑  收藏  举报