Odd field in struct? c++ -
Odd field in struct? c++ -
hi wondering if explain me field in struct looks this:
struct illustration { void (someclass::*somemethod)(); };
what , how/why utilize it? thanks.
this construction contains pointer function void homecoming type , without parameters.
we set pointer address of actual function , execute function via pointer time later. function pointers convenient thing providing different functions handle task depending on circumstances.
c++
Comments
Post a Comment