Pointer formatting

At the minimum level of detail, only the word ptr displays for a pointer object. Click More detail to reveal the pointed-to object. Consider the following:

      typedef int (*FUNCP)();             // a function pointer
      FUNCP Table[3] = { main, exit };    // table of pointers
The sequence below shows how you might inspect the object:

      
    Table: array
      
      
    Table: { ptr ptr NULL }
      
      
    Table: 0: ptr
          1: ptr
          2: NULL
      
      
    Table: 0: -> main()
          1: ptr
          2: NULL
      
      
    Table: 0: -> function-returning-int
          1: ptr
          2: NULL
      
      
    Table: 0: pointer-to-function-returning-int
          1: ptr
          2: NULL
      
      Table: 3-item-array-of-pointer-to-function-returning-int

[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker