Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ofApp : public ofBaseApp{
- public:
- void setup();
- void update();
- void draw();
- int addition (int a);
- int operation (int a, int (*f)(int));
- };
- void ofApp::setup(){
- operation(1, std::bind(&ofApp::addition, this));
- }
- int ofApp::addition (int a){
- return (a+a);
- }
- int ofApp::operation (int a, int (*f)(int)){
- int g = 0;
- g = (*f)(a);
- return (g);
- }
Add Comment
Please, Sign In to add comment