what is the type of tmp, is it int ?Code:typedef int (*test) ( float * , float*) test tmp;
what is the type of tmp, is it int ?Code:typedef int (*test) ( float * , float*) test tmp;
Ruh roh, Shaggy!!Code:typedef int (*(*f)(int (*)(int)))(int (*)(int));
No, the type of tmp is the one which precedes it, 'test' in this case.
the typedef statement defines an alias for an already existing datatype or to create a new user defined datatype.
Here, ud_int is a user defined datatype which is similar to int.Code:eg: typedef int ud_int; ud_int var1;
On the same lines,
'test' is the new datatype which you have defined and 'test' happens to be a pointer to a function which accepts two arguments of type float and returns an integer.Code:typedef int (*test) ( float * , float*)
Check this link below for more details on function pointers.
http://www.newty.de/fpt/intro.html
cheers
maverix
Thanks maverix