----I love the pointer in C very well. I have just learned how to declare a pointer to a function and how to use it:
Code:
void (*start)(void); /*The star should be placed with the word*/
start = &hello;
(*start)();
----But I'm not willing to use the pointer with a lot of different types. I'm wondering is it possible to transform a pointer between a void pointer and a pointer to function. This is strange, I can't figure out how to write it.
----And this is my solution:
Code:
(* /*Get the value of the function pointer */
(void (*)(void))
/*A function pointer type*/
start /*which is transformed from the void pointer to the type above.*/
)
(); /*Excute*/
----Oh my dear, it works, how amazing is that, and by the way I got the answer myself. Thanks God and also thank you everybody for sharing it with me.