pointer to a function
-
wrote on 31 Dec 2018, 12:55 last edited by
HI
I have a function:void MainWindow::WriteID() { ... }
I want to make a pointer to this function. here is my code:
void (*F_Code)() = MainWindow::WriteID;
but receive this error:
error: void value not ignored as it ought to be void (*F_Code)() = MainWindow::WriteID;
why?
-
HI
I have a function:void MainWindow::WriteID() { ... }
I want to make a pointer to this function. here is my code:
void (*F_Code)() = MainWindow::WriteID;
but receive this error:
error: void value not ignored as it ought to be void (*F_Code)() = MainWindow::WriteID;
why?
@rezaMSLM you need to google for "pointer to member function" to get the correct syntax.
2/2