I'm trying to fill in a few gaps in my knowledge of C and have started to look into function pointers. I understand how they work and what the process is but I can't for the life of me think of an example that I could play around with where they are really useful.
What is the main use of function pointers? The tutorial I have been reading is rather sparse on information (I mean it tells you how to use them and what the syntax is but it does not give me many ideas for simple programs I could write to get more comfortable with them).
Basically from what I have read they seem handy for replacing switch and if statements and for callbacks (something I also need to look into). I think I'm missing out on not understanding them as they seem a pretty important aspect of C.
What is the main use of function pointers? The tutorial I have been reading is rather sparse on information (I mean it tells you how to use them and what the syntax is but it does not give me many ideas for simple programs I could write to get more comfortable with them).
Basically from what I have read they seem handy for replacing switch and if statements and for callbacks (something I also need to look into). I think I'm missing out on not understanding them as they seem a pretty important aspect of C.