/**
* Callback function is a function that passed as argument
* parameter. It's called as argument parameter.
*/
#include <iostream>
using namespace std;
void hello(){
cout << "Hello For You All Here" << endl;
}
// callback function
// function as argument parameter
void greeting(void (*func) (void)){
func();
}
int main(int argc, char *argv[]){
// callback function
greeting(hello);
return 0;
}
No comments:
Post a Comment