M
morz
#include <cstdlib>
#include <iostream>
using namespace std;
what wrong with my code? how to correct this code to make it works?
Thanks.
class test {
public:
void hello() {
cout << "hello" << endl;
}
void ok(void (*j)()) {
(*j)();
}
void callme() {
ok(hello);
}
};
int main(int argc, char *argv[]) {
test k;
k.callme();
system("PAUSE");
return 0;
}
#include <iostream>
using namespace std;
what wrong with my code? how to correct this code to make it works?
Thanks.
class test {
public:
void hello() {
cout << "hello" << endl;
}
void ok(void (*j)()) {
(*j)();
}
void callme() {
ok(hello);
}
};
int main(int argc, char *argv[]) {
test k;
k.callme();
system("PAUSE");
return 0;
}