The easiest way to do some cleaning up when exiting your program would probably be to call a special function that would do the cleaning up, with the last statement of that function being exit(), like this: void my_exit() { /* Clean up */ ... exit(); } If this isn't what you're talking about, please tell me. Michael Steiner Email: U23405 at UICVM.BITNET