In function implementation of interface
<p>In Java, if I have an interface, I can do something like this:</p>

<pre><code>blah.setOnClickListner(new OnClickListner() {
     public void clicked() { // do something }
}
</code></pre>

<p>Can I do something similar in C++?</p>
