title: C++ using passed function
body: <p>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.</p>
  
  <pre><code>class XY {   
   public:
  
     void first(void f());
     void second();        
   };
  
   void XY::first(void f()){
  
   }
  
   void XY::second(){
   f(); //passed function from first()
   }
  </code></pre>