I want the meaning of this statement

S

sam

Hi, can anybody tell me the meaning of this:-
void printfunc( void(*) (int&,int&) int&,int&) ;
 
P

Pete Becker

sam said:
Hi, can anybody tell me the meaning of this:-
void printfunc( void(*) (int&,int&) int&,int&) ;

Looks like there's a comma missing.

void printfunc( void(*fp)(int&,int&), int&, int&);

The function printfunc takes three arguments and returns void. The first
argument (which I've named fp) is a pointer to a function that takes two
arguments of type int& and returns void. The second and third arguments
are of type int&.

--

-- Pete
Roundhouse Consulting, Ltd. -- www.versatilecoding.com
Author of "The Standard C++ Library Extensions: a Tutorial and
Reference." For more information about this book, see
www.petebecker.com/tr1book.
 
V

Victor Bazarov

sam said:
Hi, can anybody tell me the meaning of this:-
void printfunc( void(*) (int&,int&) int&,int&) ;

It's a declaration of a function 'printfunc'. There is an apparent
missing comma in this statement, as well.

V
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top