Click here to Skip to main content
15,907,183 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionParallel Programming Pin
Gordon Robert Speirs23-Nov-05 23:09
professionalGordon Robert Speirs23-Nov-05 23:09 
Questionproject encryption Pin
pankaj_cout23-Nov-05 23:00
pankaj_cout23-Nov-05 23:00 
AnswerRe: project encryption Pin
toxcct23-Nov-05 23:06
toxcct23-Nov-05 23:06 
QuestionDestruction in C++ Pin
ita_cas23-Nov-05 22:28
ita_cas23-Nov-05 22:28 
AnswerRe: Destruction in C++ Pin
toxcct23-Nov-05 22:32
toxcct23-Nov-05 22:32 
AnswerRe: Destruction in C++ Pin
khan++23-Nov-05 22:35
khan++23-Nov-05 22:35 
AnswerRe: Destruction in C++ Pin
Owner drawn24-Nov-05 0:04
Owner drawn24-Nov-05 0:04 
AnswerRe: Destruction in C++ Pin
Gary R. Wheeler25-Nov-05 3:50
Gary R. Wheeler25-Nov-05 3:50 
Actually, delete is an operator, and destructors are called when an object is deleted. Here's an example:
class A {
public:
  ~A();
};
class B: public A {
  ~B();
};
class C: public B {
  ~C();
};
//...
C *c;
delete c;
When the line delete c; is executed, destructors are called in the following order: C::~C(); B::~B(); A::~()A;, and then the memory itself is freed. The same thing happens in this case:
{
  C c;
  //...
}
when execution passes the closing brace, the c object is deleted by falling out of scope, and the destructors are called in the same order as before.


Software Zen: delete this;
QuestionHow do I close another program from my program Pin
shortwave23-Nov-05 22:15
shortwave23-Nov-05 22:15 
AnswerRe: How do I close another program from my program Pin
toxcct23-Nov-05 22:20
toxcct23-Nov-05 22:20 
GeneralRe: How do I close another program from my program Pin
ThatsAlok23-Nov-05 22:40
ThatsAlok23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
Cool Ju23-Nov-05 22:40
Cool Ju23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
sanket.patel25-Nov-05 23:04
sanket.patel25-Nov-05 23:04 
Questionunsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:05
Cedric Moonen23-Nov-05 22:05 
AnswerRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:12
toxcct23-Nov-05 22:12 
GeneralRe: unsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:25
Cedric Moonen23-Nov-05 22:25 
GeneralRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:29
toxcct23-Nov-05 22:29 
GeneralRe: unsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:33
Cedric Moonen23-Nov-05 22:33 
GeneralRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:37
toxcct23-Nov-05 22:37 
GeneralRe: unsigned 64 bits ? Pin
BadKarma23-Nov-05 23:41
BadKarma23-Nov-05 23:41 
AnswerRe: unsigned 64 bits ? Pin
cmk24-Nov-05 4:41
cmk24-Nov-05 4:41 
QuestionMultiple inheritance in vc++ Pin
infotechtata23-Nov-05 19:58
infotechtata23-Nov-05 19:58 
AnswerRe: Multiple inheritance in vc++ Pin
sunit523-Nov-05 20:18
sunit523-Nov-05 20:18 
GeneralRe: Multiple inheritance in vc++ Pin
infotechtata23-Nov-05 20:28
infotechtata23-Nov-05 20:28 
GeneralRe: Multiple inheritance in vc++ Pin
sunit523-Nov-05 21:04
sunit523-Nov-05 21:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.