Click here to Skip to main content
15,915,863 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to do new CArray??? Pin
Michael Dunn18-Mar-07 11:11
sitebuilderMichael Dunn18-Mar-07 11:11 
QuestionCopy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 9:24
Sean Wcisel18-Mar-07 9:24 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 9:52
professionalPJ Arends18-Mar-07 9:52 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 10:12
Sean Wcisel18-Mar-07 10:12 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 10:37
professionalPJ Arends18-Mar-07 10:37 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 10:55
Sean Wcisel18-Mar-07 10:55 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
Michael Dunn18-Mar-07 11:16
sitebuilderMichael Dunn18-Mar-07 11:16 
GeneralRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 12:25
Sean Wcisel18-Mar-07 12:25 
Yeah, I took a few C++ classes, then about three semesters of C# (very astute). So then (referring to my above posts), how do I get that deep assignment that I need from where I am?

masterArray[i] = Node(someNode);

doesn't do the trick. Like I said, I get a shallow assignment after that line calls

Node::Node(const Node& n)
{
name = n.name;
lChild = n.lChild;
rChild = n.rChild;
placed = n.placed;
arraySpot = n.arraySpot;
dRPtr = n.dRPtr;
}

in node.h.

oddly, I get precisely the same thing happening if I give it

masterArray[i] = someNode;

still shallow assignment!

however, this time the overloaded operator is called:

Node& Node::operator =(const Node& n)
{
name = n.name;
lChild = n.lChild;
rChild = n.rChild;
placed = n.placed;
arraySpot = n.arraySpot;
dRPtr = n.dRPtr;
return *this;
}

why won't that give me my deep assignment?



Thanks again guys
-Sean
QuestionRe: Copy constructor question (am I doing something stupid here?) Pin
PJ Arends18-Mar-07 12:37
professionalPJ Arends18-Mar-07 12:37 
AnswerRe: Copy constructor question (am I doing something stupid here?) Pin
Sean Wcisel18-Mar-07 15:40
Sean Wcisel18-Mar-07 15:40 
QuestionButtons and NM_CUSTOMDRAW Pin
Jerry Evans18-Mar-07 9:19
Jerry Evans18-Mar-07 9:19 
AnswerRe: Buttons and NM_CUSTOMDRAW Pin
PJ Arends18-Mar-07 20:44
professionalPJ Arends18-Mar-07 20:44 
GeneralRe: Buttons and NM_CUSTOMDRAW Pin
Jerry Evans19-Mar-07 5:45
Jerry Evans19-Mar-07 5:45 
Questionvideo streaming in handheld devices such as pda Pin
Member 393433118-Mar-07 8:58
Member 393433118-Mar-07 8:58 
Questionohhhhh help me anyone Pin
samozx18-Mar-07 8:53
samozx18-Mar-07 8:53 
AnswerRe: ohhhhh help me anyone Pin
Software_Specialist18-Mar-07 8:58
Software_Specialist18-Mar-07 8:58 
GeneralRe: ohhhhh help me anyone Pin
Sean Wcisel18-Mar-07 9:35
Sean Wcisel18-Mar-07 9:35 
AnswerRe: ohhhhh help me anyone Pin
PJ Arends18-Mar-07 12:01
professionalPJ Arends18-Mar-07 12:01 
AnswerRe: ohhhhh help me anyone Pin
Stephen Hewitt18-Mar-07 12:49
Stephen Hewitt18-Mar-07 12:49 
AnswerRe: ohhhhh help me anyone Pin
Mark Salsbery19-Mar-07 4:32
Mark Salsbery19-Mar-07 4:32 
QuestionReading CSV file ? Pin
Software_Specialist18-Mar-07 8:52
Software_Specialist18-Mar-07 8:52 
AnswerRe: Reading CSV file ? Pin
PJ Arends18-Mar-07 9:24
professionalPJ Arends18-Mar-07 9:24 
GeneralRe: Reading CSV file ? Pin
Software_Specialist18-Mar-07 9:57
Software_Specialist18-Mar-07 9:57 
GeneralRe: Reading CSV file ? Pin
PJ Arends18-Mar-07 10:26
professionalPJ Arends18-Mar-07 10:26 
GeneralRe: Reading CSV file ? Pin
Software_Specialist18-Mar-07 10:55
Software_Specialist18-Mar-07 10:55 

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.