Destructor on a local variable, C/C++ Programming

Should I explicitly call a destructor on a local variable? Explain it.

Posted Date: 2/13/2013 1:39:17 AM | Location : United States





No! 

The destructor will get called again at the close} of the block where the local was created. This is a assurance of the language; it occurs automatically; there''s no way to stop it from happening. But you can get actually bad results from calling a destructor on similar object a second time! Bang! You''re dead!

Posted by Bony | Posted Date: 2/13/2013 1:41:49 AM


Related Discussions:- Destructor on a local variable, Assignment Help, Ask Question on Destructor on a local variable, Get Answer, Expert's Help, Destructor on a local variable Discussions

Write discussion on Destructor on a local variable
Your posts are moderated
Related Questions
Define the Logical Operators in c language? The Logical operators deals with the ways the relationships are able to connected. C has the following three logical operators

Requirements: 1.  This assignment as well as other assignments in this class must be finished on Windows operating system. 2.  Zip your program and submit the zip file on ANG

Q:  Tells the operators one can override; which operators should he override? A: Bottom line: don't puzzle your users. Remember the reason of operator overloading: to decreas

Nested Classes Many a times, it becomes essential to have a class contain properties of two other classes. One way is to explain a class within another - that is a class with m


Most first graders know that nine hundred and ninety nine plus one is one thousand, but C++ doesn't! Sure, a computer can easily compute 999 + 1 and get 1000. But reading and writi

how can I write a c++ program that generate all evn numbers less than 1000?

Train Station C++ Program A C++ program that provides a simple text based interface that will allow a user to create, edit, search, or delete a train schedule. The program will m

Write a function that has int parameter n, makes another type of mask having n bit 1's from the left most bit and 32- n bit 0's next. The mask is called netmask in this seminar, an

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".