pointer to function ??
hi,
can someone explain this to me :
0: using namespace ldm;
1: struct cmd_parse_t {
2: char flag; 3: void (*taskfunc)(ldm::diskio& dev, int argc, char** argv); 4: bool readonly;
5: };
what does line 3 do ? is it a pointer to a function or something else ?
Quoted 6 lines · Nasir Hossain
hi,
can someone explain this to me :
0: using namespace ldm;
Quoted 7 lines
1: struct
cmd_parse_t{2: char flag; 3: void (*taskfunc)(ldm::diskio& dev, int argc, char** argv); 4: bool readonly;5: };
what does line 3 do ? is it a pointer to a function or something else ?
Exactly! It's a pointer to function.
Prototype looks like follow:
void taskfunc(ldm::diskio& dev, int argc, char** argv);
best regards,
SoV