I have a linked list of families. I delete one of the brothers and sisters, such as.
p->myWife->myChildren=p->myWife->myChildren->mySibling;
delete p->myWife->myChildren->mySibling;
and then I print the child / siblings attributes based on this
if(p->myWife->myChildren->mySibling!=NULL){
print the childs attributes
}
Whenever I type, it prints a weird number for brother (im takes its memory address) What do I need to do to make this pointer null?
source
share