array as pointer passing to function

in the following  code what heppand in particuler..
char *(*fun( int ))(void);??!!
and what code
char *string(void) mean???
then give up example of class template.
fathikhidAsked:
Who is Participating?
 
AlexVirochovskyConnect With a Mentor Commented:
fathikhid , i can send you pointer tutprial with reply to same(and more complex) Q. Write you EMail, if you want it.
 
0
 
ntdragonCommented:
about the first it look like a pointer to function but it look too weird

about the second it a function named string that returns a char* and gets a pointer

about the template

template <class T>
class myclass{
T i;
public:
myclass(T x):i(x){}
~myclass(){}
}
0
 
KangaRooCommented:
The first one might be a pointer to a function that returns a pointer to a function. But I don't like such declarations and would prefer to see them typedefed in understandable pieces, like
typedef char* (*FuncPtr)(int);
typedef FuncPtr (*FP2)();
FP2 fun;

I think the second one is a function named string that returns a char* and takes no arguments.
0
 
GlennDeanCommented:
I'm looking at an "unscrambler algo" for weird definitions and the first, by this algo, says

"fun is a function taking an int parameter returning a pointer to a function taking no parameters returning a char *"

The second one ntdragon and kangaroo have already said what it is.

   Glenn

0
All Courses

From novice to tech pro — start learning today.