How would you implement the try/finally construct in C++?
Utilisateur anonyme
via destructor of scoped object. I would create a dummy object in "try" scope, and put the "finally" code inside the destructor of that object. Since DTOR is guranteed to be called it will always perform the "finally" statements