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
Explain what are Unions? The Unions like as structures, contain members whose individual data types may perhaps differ from one another. Though the members that create a union

Access privileges 1. If the designer of the base class needs no one, not even a derived class to access a member, then that member should be made private. 2. If the designer

Define  C o ns t a n t a r g u me n t : T h e a r gu m e n t c a n b e a c on s t a n t a r gu m e n t .    T h e c o

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

luminous jewel polishing necklace, c/c++ programming

There is a pebble merchant. He sells the pebbles, that are used for shining the floor. His main duty is to take the length of the room’s sides. But he sometimes mistakes doing that

Describe what is actual arguments? - When certain functions are created and used to perform an action on some provided values, some values are required to be passed to them. Th

#questio A charitable organization wants to design a special ATM machine to be used by needy people. The association supplies the needy person with a pin number to be able to use

Write a program that predicts users’ age (0-128 years old) with at most 7 questions. The game starts with asking the user whether he/she is younger or older than G (an initial gues

Simpson's Rule is a more accurate method of numerical integration than the method described in class. Using Simpson's Rule, the integral of a function f between a and b is approxim