Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > declare a pointer to a function ..

Reply
Thread Tools

declare a pointer to a function ..

 
 
JDT
Guest
Posts: n/a
 
      03-30-2007
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
 
Reply With Quote
 
 
 
 
red floyd
Guest
Posts: n/a
 
      03-30-2007
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>);
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Howto declare a function pointer to a method in a class? Francois Grieu C++ 5 10-25-2011 04:29 PM
how do you declare pointer to such nested member function? Mike Wahler C++ 4 03-25-2007 09:44 AM
forward declare member function so that it can be friend function yancheng.cheok@gmail.com C++ 1 11-09-2006 11:30 AM
How to declare and use a function pointer? Sam Waller C++ 2 07-14-2006 09:59 PM
how to declare pseudo-matrix function argument that is not modified by function? classicist C Programming 3 10-05-2005 02:45 AM



Advertisments