Can anyone please tell me,
- what exactly is meant by registering a callback function in C (with some examples)?
- what are Notify callbacks ?
- what are Asynchronous call backs?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Registering a callback function simply means that you are arranging for an external entity to call your function.
It might happen at a later time, or it might happen straight away. A straightforward example is
qsort. It is declared like this:In order to use it, you must pass a pointer to a function that compares elements – the callback.
That was a simple example but generally “registering a callback” means passing a function pointer to someone who will call it for you in the future.