How would you implement the try/finally construct in C++?
Anonymous
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
Check out your Company Bowl for anonymous work chats.