0
In C++,is it possible to pass functions as argument of another function??
4 ответов
+ 1
White Devil 😈
You can use function pointer
Example
void printNum(int num) {
cout << num << endl;
}
void runFunc(void (*func)(int), int num) {
func(num);
}
int main() {
runFunc(printNum, 5);
return 0;
}
+ 1
Yes it's possible
0
can you explain it agent_i
0
Thank you bro 😀😀😀