Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What happens if an exception is throws from an, object's
constructor and object's destructor?

Answer Posted / akshay

constructor:
the destructors of all the member objects that were
correctly created are called, then code goes to the catch
statement if any

dtors:
legally allowed, however, it should be caught within the
function. if it is not caught, then it may lead to a call to
terminate() function. this call would happen in the case
when the destructor was itself called due to stack unwinding
happening because of another exception in probably some
other function.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of scopes are there in c++?

1055


What is the use of data hiding?

984


What is a pointer how and when is it used?

1051


Is java a c++?

999


What are pointers used for c++?

1025


If a function doesn’t return a value, how do you declare the function?

1019


What are the defining traits of an object-oriented language?

1155


What is iterator c++?

939


How would you implement a substr() function that extracts a sub string from a given string?

1003


Why do we need pointers?

956


Why do we need templates?

959


What are the syntactic rules to be avoid ambiguity in multiple inheritance?

1138


What is constructor and destructor in c++?

1065


What are c++ storage classes?

1063


How do I tokenize a string in c++?

1043