Re: Please Can Anny One Tell What This Declaration Says ?



On 15 May 2006 05:39:44 -0700, "code break" <pkumesh@xxxxxxxxx> wrote:

typedef void(*FP);
FP UserMenuFunk[7];
FP UserFunk[7];

Please your comments on this help me lot .

The parentheses are just a confusion factor.

FP is a typedef (synonym) for pointer to void.

UserMenuFunck and UserFunk are each an array of 7 pointer to void.

If the typedef had been void "(*FP)()" (at least the original
parentheses would make sense), then FP would have been a synonym for
pointer to function.


Remove del for email
.



Relevant Pages

  • Re: Casting function pointers
    ... which accepts generic objects via void pointers, ... I think you intended to typedef 'dict_delete' not 'delete'. ... The delete parameter to dict_new will be converted to be of "pointer ... For dictionaries of more complex objects, though, I might ...
    (comp.lang.c)
  • Re: Pointer Indirection Syntax
    ... we have a need for a pointer to a pointer ... >> to a function returning void and having void parameters. ... >> What is the syntax for declaring a pointer to a pointer ... typedef void; ...
    (comp.lang.c)
  • Table of pointers to templated functions
    ... How do I declare a typedef of a pointer to a templated ... template ... void print_name ...
    (comp.lang.cpp)
  • Re: Trying to Retrieve a List of Active Serial/Com Ports
    ... typedef PVOID HANDLE; ... So HANDLE is a void* or a PVOID, which I would -guess- is just ... HANDLE is probably a pointer. ... trying to store a pointer in an int. ...
    (comp.lang.c)
  • Re: Question about C code and use of "void"
    ... declares a variable called fnptr that is a pointer to a function that ... takes an int argument and returns void, ... pointer to a function that takes an int argument and returns void. ... A typedef can also be used to define a function type. ...
    (microsoft.public.vc.language)