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