samedi 25 février 2017

C++ using passed function

I have two functions one of them takes a function as an argument this works just fine, but I want to call this passed function in my second one.

class XY {   
 public:

   void first(void f());
   void second();        
 };

 void XY::first(void f()){

 }

 void XY::second(){
 f(); //passed function from first()
 }

Aucun commentaire:

Enregistrer un commentaire