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

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -