Constructor , C/C++ Programming

How can I handle a constructor that fails?

Posted Date: 2/13/2013 1:12:29 AM | Location : United States





The answer of your problem is

Throw an exception. Constructors don''t have a return type, so it''s not probable to make use of return codes. The best way to signal constructor failure is therefore to throw an exception.

Posted by John | Posted Date: 2/13/2013 1:14:39 AM


Related Discussions:- Constructor , Assignment Help, Ask Question on Constructor , Get Answer, Expert's Help, Constructor Discussions

Write discussion on Constructor
Your posts are moderated
Related Questions
Using Figure 10.2 as a model, illustrate the result of each operation in the sequence ENQUEUE.Q; 4/, ENQUEUE.Q; 1/, ENQUEUE.Q; 3/, DEQUEUE.Q/, ENQUEUE.Q; 8/, and DEQUEUE.Q/ on an i

3 . Write a ā€˜Cā€™ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

Described multiple inheritance(virtual inheritance)? And explain its advantages and disadvantages? A: It is the procedure in which a child can be derived from more than one pare

Implement multiple stacks in a single dimensional array using c.

#write a program that counts the number of occurances of the string in the n-th padovan string p(n)


Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

#question.to determine the area of a triangle,rectangle and trapezium

write a c program to solve exanple of lamis therom

count the number of string in n-th padovan string