home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / CH03 / A03111.TXT < prev    next >
Encoding:
Text File  |  1993-11-26  |  623 b   |  11 lines

  1. A Pointer is an object that contains the address of another
  2. object.  Use the dereference operator, star, to declare a pointer.
  3. Here, "ip" is a pointer to an int and "dp" is a pointer to a
  4. double.  Notice that the initial value of "dp" is the address of
  5. "d".  You can declare pointers to all types, including
  6. user-defined types.  Here, "func" is a pointer to a function that
  7. takes one argument, a pointer to a character, and returns an int.
  8. Note that if the parentheses around *func were removed, "func"
  9. would be the name of a function that returns a pointer to an
  10. integer.  Unlike C, C++ allows pointers to void.
  11.