Differnce between function pointers and pointers to function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • valvos007
    New Member
    • Apr 2008
    • 2

    Differnce between function pointers and pointers to function

    Hi All,

    Can anyone please explain about difference between function pointers and pointers to function with an example?
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Originally posted by valvos007
    Hi All,

    Can anyone please explain about difference between function pointers and pointers to function with an example?
    function pointer and pointer to a function are one and the same.
    Other members please comment on this
    Raghuram

    Comment

    • mmk
      New Member
      • Oct 2006
      • 19

      #3
      Originally posted by gpraghuram
      function pointer and pointer to a function are one and the same.
      Other members please comment on this
      Raghuram
      Yes , Raghu is correct .

      The function pointer *fp can be declared as void (*fp)(int), which specifies both the return type (void) and the types of arguments (int) of the function. We then assign the pointer to a particular function, and having done so, can then call the function just as we normally would.

      Comment

      Working...