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. Advertising

  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. Advertising

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. classicist
    Replies:
    3
    Views:
    336
  2. Sam Waller
    Replies:
    2
    Views:
    459
    Stuart Golodetz
    Jul 14, 2006
  3. Replies:
    1
    Views:
    1,339
    Jim Langston
    Nov 9, 2006
  4. Mike Wahler
    Replies:
    4
    Views:
    337
    =?ISO-8859-1?Q?Erik_Wikstr=F6m?=
    Mar 25, 2007
  5. Francois Grieu
    Replies:
    5
    Views:
    302
    Krice
    Oct 25, 2011
Loading...

Share This Page