How can one handle a constructor that fails?, C/C++ Programming

How can one handle a constructor that fails?

Posted Date: 3/15/2013 5:15:55 AM | Location : United States





Q: How can one handle a constructor that fails?

A: Though throwing an exception. Constructors don''t contain a return type, so it''s not achievable to use return codes. The finest way to signal constructor failure is thus to throw an exception 

 

Posted by | Posted Date: 3/15/2013 5:16:18 AM


Related Discussions:- How can one handle a constructor that fails?, Assignment Help, Ask Question on How can one handle a constructor that fails?, Get Answer, Expert's Help, How can one handle a constructor that fails? Discussions

Write discussion on How can one handle a constructor that fails?
Your posts are moderated
Related Questions
There are 25 employees in a business. Each employee has 5 sales each day of the month (Assume there are 30 days in each month of the year). Draw a flowchart for a pr

write c program to do the following : -fill 2 dimensional array (square matrix array with size=4). -ask the user to enter any integer number and add this number to the diagonals -o

A r r a y s w i t h i n a c l a s s: I t i s j u s t d ecl a r i n g o r c on s t ru c ti n g a d e r i v e d t

Define Internal static storage class - computer programming? The Internal static variables are those that declared inside a function. The scope of the internal static variables

Create a Document that show information about albums. First create a paragraph or two about the purpose of the page and your interests in music: genres, styles, etc. Next have a

Differentiate between a template class and class template in C++? Ans) Template class: A generic definition or a parameterized class not instantiated until the client gives the

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve betw



how we use the cin command and why we use this command????