SmartVessel

Foucs on C++

博客园 首页 新随笔 联系 订阅 管理

2011年4月18日 #

摘要: It's considered safer because a lot of people have "heard" that it's safer and then told others, who now have also "heard" that it's safer. Not a single person who understands references will tell you that they're any safer than pointers, they have the same flaws 阅读全文
posted @ 2011-04-18 11:41 SmartVessel 阅读(269) 评论(0) 推荐(0) 编辑

摘要: Summary from answers and links below: A pointer can be re-assigned any number of times while a reference can not be reassigned after initialization. A pointer can point to NULL while reference can never point to NULLYou can't take the address of a reference like you can with pointersThere's 阅读全文
posted @ 2011-04-18 09:54 SmartVessel 阅读(379) 评论(0) 推荐(0) 编辑