[Dev-C++] Constructors throwing exceptions.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2002-07-23 12:52:37
|
Hello all, I want my constructors (default, overloaded, and copy) to throw an exception if they fail. 1) How do I test if the constructor has failed? 2) Is it better to create an Exception class to throw exception objects, rather than throwing strings and integers? 3) Where does the catch block go? In the main function after the object has been created? Or in the constructor body? Many thanks, Daniel _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |