Click here to Skip to main content
15,304,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionNeed info on some good books!! Pin
pavanbabut16-Feb-06 13:05
Memberpavanbabut16-Feb-06 13:05 
AnswerRe: Need info on some good books!! Pin
A.A.16-Feb-06 19:09
MemberA.A.16-Feb-06 19:09 
GeneralRe: Need info on some good books!! Pin
pavanbabut17-Feb-06 7:31
Memberpavanbabut17-Feb-06 7:31 
GeneralRe: Need info on some good books!! Pin
A.A.18-Feb-06 15:18
MemberA.A.18-Feb-06 15:18 
GeneralRe: Need info on some good books!! Pin
pavanbabut21-Feb-06 7:02
Memberpavanbabut21-Feb-06 7:02 
QuestionRemoveAll() method Pin
Kleser16-Feb-06 11:51
MemberKleser16-Feb-06 11:51 
AnswerRe: RemoveAll() method Pin
George L. Jackson16-Feb-06 12:38
MemberGeorge L. Jackson16-Feb-06 12:38 
AnswerRe: RemoveAll() method Pin
Owner drawn16-Feb-06 17:21
MemberOwner drawn16-Feb-06 17:21 
This is what MSDN says about it:

Notice the difference between deleting an element's object and removing the element itself. Removing an element from the list merely removes the list's reference to the object. The object still exists in memory. When you delete an object, it ceases to exist and its memory is reclaimed. Thus, it is important to remove an element immediately after the element's object has been deleted so that the list won't try to access objects that no longer exist.

CArray<CPerson*, CPerson*> myArray;

<font color=blue>int</font> i = 0;
<font color=blue>while</font> (i < myArray.GetSize() )
{
    <font color=blue>delete</font> myArray.GetAt( i++ );
}

myArray.RemoveAll();


Owner drawn
Jesus Loves
AnswerRe: RemoveAll() method Pin
John R. Shaw16-Feb-06 20:23
MemberJohn R. Shaw16-Feb-06 20:23 
AnswerRe: RemoveAll() method Pin
ThatsAlok17-Feb-06 3:36
MemberThatsAlok17-Feb-06 3:36 
GeneralRe: RemoveAll() method Pin
Kleser17-Feb-06 4:28
MemberKleser17-Feb-06 4:28 
GeneralRe: RemoveAll() method Pin
ThatsAlok17-Feb-06 19:18
MemberThatsAlok17-Feb-06 19:18 
GeneralRe: RemoveAll() method Pin
Kleser18-Feb-06 11:45
MemberKleser18-Feb-06 11:45 
QuestionNeed help with code! Pin
scorpiotkh16-Feb-06 9:49
Memberscorpiotkh16-Feb-06 9:49 
AnswerRe: Need help with code! Pin
David Crow16-Feb-06 10:53
MemberDavid Crow16-Feb-06 10:53 
GeneralRe: Need help with code! Pin
Nick_Kisialiou16-Feb-06 13:58
MemberNick_Kisialiou16-Feb-06 13:58 
GeneralRe: Need help with code! Pin
scorpiotkh16-Feb-06 15:08
Memberscorpiotkh16-Feb-06 15:08 
GeneralRe: Need help with code! Pin
scorpiotkh16-Feb-06 14:07
Memberscorpiotkh16-Feb-06 14:07 
GeneralRe: Need help with code! Pin
David Crow16-Feb-06 15:18
MemberDavid Crow16-Feb-06 15:18 
QuestionDefault constructor vs. Explicit constructor Pin
bob1697216-Feb-06 8:54
Memberbob1697216-Feb-06 8:54 
AnswerRe: Default constructor vs. Explicit constructor Pin
Michael Dunn16-Feb-06 9:03
sitebuilderMichael Dunn16-Feb-06 9:03 
GeneralRe: Default constructor vs. Explicit constructor Pin
bob1697216-Feb-06 9:10
Memberbob1697216-Feb-06 9:10 
GeneralRe: Default constructor vs. Explicit constructor Pin
John R. Shaw16-Feb-06 20:35
MemberJohn R. Shaw16-Feb-06 20:35 
GeneralRe: Default constructor vs. Explicit constructor Pin
bob1697217-Feb-06 15:05
Memberbob1697217-Feb-06 15:05 
GeneralRe: Default constructor vs. Explicit constructor Pin
John R. Shaw19-Feb-06 11:56
MemberJohn R. Shaw19-Feb-06 11:56 

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.