C++ declarative syntax

M

muler

Q. Write a function declaration that takes a double argument and
returns a pointer to a function that takes an int argument and returns
a pointer to char without using a typedef?

using a typedef, it's easy:

typedef char* (*Ptr_func)(int);
Ptr_fun Func(double);

Thanks,
 
V

Victor Bazarov

Q. Write a function declaration that takes a double argument and
returns a pointer to a function that takes an int argument and returns
a pointer to char without using a typedef?

That's not a question (even if you end it with a question mark). It's
an assignment.
using a typedef, it's easy:

typedef char* (*Ptr_func)(int);
Ptr_fun Func(double);

We don't do assignments. FAQ 5.2.

V
 
M

muler

That's not a question (even if you end it with a question mark).  It's
an assignment.





We don't do assignments.  FAQ 5.2.

V

it was just out of curiosity i asked that.
 

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
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top