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
C Program for 5 FUNCTION OF VOWELS, CNT_WORDS, REVERSE void input(char a[]); void output(char a[]); void reverse(char a[], char b[]); char poli(char a[], char b[]);

Develop a function to calculate sum of n even integers starting from a given even integer

please provide me the assignment help. What is the difference between a copy constructor and an overloaded assignment operator?

how to create a shopping cart and sibmit the code segment on screan

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.


#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 techn

A: this is a procedure during exception handling while the destructor is called for all local objects in the stack among the place where the exception was thrown & where this is ca

A: No. Syntax wise it is permitted. But then the function is no longer Inline. Since the compiler will never know how deep the recursion is at compilation time.

Project Description: P2P media streaming browser (IE, Chrome, Firefox) plug-in needed that is compatible with Win Xp,7,8 that is Windows Firewall friendly Example like Swarm