Ray's playground

 

References & the Copy-Constructor(Chapter 11 of Thinking in C++)

  There are certain rules when using references:
  1. A reference must be initialized when it is created. (Pointers can be initialized at any time.)

  2. Once a reference is initialized to an object, it cannot be changed to refer to another object. (Pointers can be pointed to another object at any time.)

  3. You cannot have NULL references. You must always be able to assume that a reference is connected to a legitimate piece of storage. 

posted on 2010-11-22 22:38  Ray Z  阅读(195)  评论(0编辑  收藏  举报

导航