What is CALLBACK? How it work?
what is the advantage of CALLBACK,
please explain with an example
Answer Posted / zero zero....
• callback function is a function that is called
through a function pointer.
• pass the pointer (address) of a function as an
argument to another, when that pointer is used to call the
function it points to it is said that a call back is made.
// 2.1 define a function pointer and initialize to NULL
int (*pt2Function)(float, char, char) =
NULL; // C
int (TMyClass::*pt2Member)(float, char, char) =
NULL; // C++
int (TMyClass::*pt2ConstMember)(float, char, char) const =
NULL; // C++
• A callback function is a function that is passed
to another function (in the form of a pointer to the
callback function) so that the second function can
call it. This is simply of way of making the second
function more flexible without the second function needing
to know a lot of stuff
Uses:
• A callback can be used for notifications
• callback functions can be used for updates, sort of
like hooking into another function. For example, consider a
function that downloads files using http. Your application
may want to display progress to the user. You could pass a
callback function (display progress) into the download
function so that it calls your display function everytime
it reads from the socket. At least that is my
understanding...
Is This Answer Correct ? | 30 Yes | 6 No |
Post New Answer View All Answers
How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?
Do you have an idea about MFC?
How do I create a dialog box in mfc?
plzz tell me what we can do and dont in tally ERP & sap business one?
What does mfc stand for?
What is the difference between Struts and JSF? Pls list some most suitable differences.
2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers
what is functioning of DIalodDataXchange ..?
I want recent paper pattern for HP company?
List out the basic features of MFC.
what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?
what message is sent to an application when the user presses the primary button?
What is mfc class hierarchy?
how to repaint when working with horizontal scroll bar