Mail Archives: djgpp/1999/12/22/21:54:22
¦p¦ąłoŻ (calias DOT bbs AT cszone DOT twbbs DOT org) wrote:
: hmm. I didn't have much experience about pointer&structure..
: but it is quite strange...
: the structure :
: struct LINEPtr{
: CONNECTLINE *clptr;
: LINEPtr *next;
: };
: //(it is in a member function of class)
: LINEPtr *clp,FirstPtr;
: FirstPtr=clp;
Without looking to much further, You are assignement does not look right
unless, you meant
LINEPtr *clp, *FirstPtr;
^^^
: //when i use
: clp->next=new LINEPtr;
: clp=clp->next;
: clp->clptr=(something)
: clp->next=FirstPtr->next;
: //then i delete
: clp=clp->next;
: delete clp;
: //the value of clp->next become 0x3
: //and I can't use it to delete the next one...
: //but this kind pointer&structure
: //i can use it exactly in other place
: //why?
--
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!
- Raw text -