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
Should one design a classes from the outside (interfaces first) or inside (data first)? A: From the outside. A superior interface provides a simplified view which is express

find the minimum total number of shelves

Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc, which increments its argument by 1, and dec, which decrements

In POS system, cashier computer connect to printer using serial rs232 usb or cable. We need to capture data from that connection, and parsing the data to get total amount for every

Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register

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

A string is said to be "Beautiful"€, if it contains only non repetitive alphabets

Illustration of Grid function: For illustration, the script below creates two individual figure windows. At First, it clears the figure window. Then, it generates an x vector

Project Description: I have a barber salon I am seeking someone to build me software for my PARTNER PT6910 touch screen till system. This software must add multiple staff login

In this problem you are given a board in which some of the elements are placed as shown in diagram below. Each element represents a color. Fill the other elements in the board, suc