How can I do this in C++
interface ActionListener { void actionPerformed(); }
jButton.addActionListener(
    new ActionListener(){ void actionPerformed() { do something } }
);
So far I know this,
class ActionListener {
  public : 
    virtual ~ActionListener(){}
    virtual void actionPerformed() = 0;
}
After this what do I do ... any keywords to do this kind of implemention would also help.
 
     
     
     
     
    