is throwing exception from a constructor not a good practice ?

Answer Posted / saranya

yes, because constructor does not throws an exception

Is This Answer Correct ?    1 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a driver program?

712


Write about the access privileges in c++ and also mention about its default access level?

709


What are friend functions in C++?

716


You run a shell on unix system. How would you tell which shell are you running?

756


Can the operator == be overloaded for comparing two arrays consisting of characters by using string comparison?

649






What is flag in computer?

685


Name the debugging methods that are used to solve problems?

664


Show the declaration for a pointer to function returning long and taking an integer parameter.

667


What is the difference between a type-specific template friend class and a general template friend class?

658


What is the benefit of encapsulation?

692


Why is c++ awesome?

661


how can i access a direct (absolute, not the offset) memory address? here is what i tried: wrote a program that ask's for an address from the user, creates a FAR pointer to that adress and shows it. then the user can increment/decrement the value in that address by pressing p(inc+) and m(dec-). NOW, i compiled that program and opened it twice (in 2 different windows) and gave twice the same address to it. now look what happen - if i change the value in one "window" of the program, it DOES NOT change in the other! even if they point to the same address in the memory! here is the code snippet: //------------------------------------------------------ #include //INCLUDE EVERY KNOWN HEADER FILE #include //FOR ANY CASE... #include #include #include main() { int far *ptr; //FAR POINTER!!! long address; char key=0; //A KEY FROM THE KEYBOARD int temp=0; clrscr(); cout<<"Enter Address:"; cin>>hex>>address; //GETS THE ADDRESS clrscr(); (long)ptr=address; temp=*ptr; //PUTS THE ADDRESS IN THE PTR cout<<"["<

1906


What does it mean to declare a destructor as static?

714


Write about the retrieval of n number of objects during the process of delete[]p?

661


How do you traverse a btree in backward in-order?

720