Hello,
I was looking on using function pointers in my code and it would be great if you guys can point me in the right direction or give hints.
I basically want to know how to invoke different functions ( functions with different arg numbers and return type) using a single function pointer.
example
Code:
void func1();
int func2(int,float);
main()
{
void (*funcptr) ();
functptr = & func1
funcptr();
funcptr = & func2 // i know that i need a different funcptr here, but is there a way i can type cast or something?
funcptr(2,2.5);
return;
}
Thanks!