function pointers declared in the moment of usage
<p>In javascript it's possible to do things like this:</p>

<pre><code>SomeObject.somefunction(function(someparameters){
//do some things.
});
</code></pre>

<p>like in jquery each function:</p>

<pre><code>$('.rawdata').each(function(index){
$(this).attr('some',index);
});
</code></pre>

<p>I searched and saw that in c/c++ we can use functions as parameters using function pointers, but didn't found a way to do some thing like the above one: to declare the function that will be pointed in the moment that it will be used. So is this possible? If it isn't, what would you recommend to use instead?</p>
