Ray's playground

 

Pointers, Arrays, and Structures(Chapter 5 of The C++ Programming Language)

  No object is allocated with the address 0 . Consequently, 0 acts as a pointer literal, indicating that a pointer doesn’t refer to an object.

  The declarator operator that makes a pointer constant is *const. There is no const* declarator operator, so a const appearing before the * is taken to be part of the base type. For example:

  char *const cp;   // const pointer to char

  char const* pc;   // pointer to const char

  const char* pc2; // pointer to const char 

posted on 2010-07-22 09:31  Ray Z  阅读(204)  评论(0编辑  收藏  举报

导航