S
srinivas.satish
Hi,
is it possible to typecast a function pointer to two different
prototypes.
eg.,
typedef void (functptr1 *) (int , int);
typedef void (functptr2 *) (int);
functptr1 fptr;
fptr = somefunction_name;
fptr(10,20);
fptr = (functptr2)someotherfunction_name;
(functptr2) fptr(10);
I tried the above it did'nt work. If this is wrong please let me know
how it could be done in the right way, also if it is compiler specific,
which compiler(s) permit this.
is it possible to typecast a function pointer to two different
prototypes.
eg.,
typedef void (functptr1 *) (int , int);
typedef void (functptr2 *) (int);
functptr1 fptr;
fptr = somefunction_name;
fptr(10,20);
fptr = (functptr2)someotherfunction_name;
(functptr2) fptr(10);
I tried the above it did'nt work. If this is wrong please let me know
how it could be done in the right way, also if it is compiler specific,
which compiler(s) permit this.