码迷,mamicode.com
首页 > 编程语言 > 详细

c++ get the pointer from the reference

时间:2017-03-13 14:24:13      阅读:150      评论:0      收藏:0      [点我收藏+]

标签:int   ++   ted   point   print   equal   get   amp   tty   

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


xp is equal to yp.

也就是说,直接对reference取地址就可以了。

c++ get the pointer from the reference

标签:int   ++   ted   point   print   equal   get   amp   tty   

原文地址:http://www.cnblogs.com/hustdc/p/6542233.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!