declare a pointer to a function ..

Discussion in 'C++' started by JDT, Mar 30, 2007.

  1. JDT

    JDT Guest

    Hi,

    Is there a way to have one statement to replace the two statements
    below? I wonder C++ systax exists to allow declaring pFunc without
    using the typedef. Your help is appreciated.

    typedef void (FUNC)(vector<int>);
    FUNC *pFunc;

    JD
     
    JDT, Mar 30, 2007
    #1
    1. Advertisements

  2. JDT

    red floyd Guest

    JDT wrote:
    > Hi,
    >
    > Is there a way to have one statement to replace the two statements
    > below? I wonder C++ systax exists to allow declaring pFunc without
    > using the typedef. Your help is appreciated.
    >
    > typedef void (FUNC)(vector<int>);
    > FUNC *pFunc;
    >
    >


    void (*pFunc)(vector<int>);
     
    red floyd, Mar 30, 2007
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. glen stark
    Replies:
    2
    Views:
    858
    Ron Natalie
    Oct 10, 2003
  2. Fraser Ross
    Replies:
    4
    Views:
    1,326
    Fraser Ross
    Aug 14, 2004
  3. murgan
    Replies:
    6
    Views:
    5,250
    Thad Smith
    Dec 21, 2005
  4. Vijai Kalyan
    Replies:
    4
    Views:
    1,079
    Vijai Kalyan
    Nov 8, 2005
  5. Sam Waller
    Replies:
    2
    Views:
    579
    Stuart Golodetz
    Jul 14, 2006
  6. Mike Wahler
    Replies:
    4
    Views:
    413
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=
    Mar 25, 2007
  7. Replies:
    3
    Views:
    461
    Philip Potter
    Apr 11, 2008
  8. Francois Grieu
    Replies:
    5
    Views:
    420
    Krice
    Oct 25, 2011
Loading...