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


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
Write a c program to determine interchanged values between two variables?[Hint - if loop] What will be the output of the program? How many times this loop will execute? Wr

We want Guys For Job in Gaming Tracks Company for a mobile game developing Project Description: I want a team of game developers for life-time as mobile dev team in my compan

when you allocate memory with new[], you ought to free the memory via delete[]. While you allocate memory along 'new', then use 'delete' with no the brackets. You employ new[] to a

Write in a file: void main() { int i,j,k,l,list[1000]; FILE *fp; char any[8];   cout cin >> any;   fp = fopen(any,"wb");     for(j=0;j     {

3 . Write a ‘C’ program to accept any 3 digit integer number from the keyboard and display the word equivalent representation of the given number.

You may work in pairs for this assignment. Submit only one project per team; both partners will receive the same grade. Also, you can earn up to 40 points (out of 25) on this assig

Question 1 Describe the theory behind class templates and function templates along with relevant programming examples Question 2 With the help of suitable programming example

Smugglers are becoming very smart day by day. Now they have developed a new technique of sending their messages from one smuggler to another. In their new technology, they are send

How to write a global inline function First, let's get away from member functions for a moment and consider a global function.  To make a request that this function be in line:

Program to design list in c: Write a program in c to insert the values in list void main() { int i=0; char a[20]; clrscr(); printf("Enter the line\n");