I have the following function:
Class Image {
IplImage* createImage( char* name )
{
IplImage* img = cvLoadImage( name );
return img;
...
}
}
int main() {
IplImage* newimg = createImage( "somepath" );
return 0;
}
After the createImage function is been executed I would like to know if there's a way to execute some code after the return statement has been accessed and the newimg has been populated with the contents of the img variable.
The above code is an example of what I want to achieve. My main question is: Is there any way I can execute code in a function even after the return statement has been reached?