Re: pointers


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]

Posted by Kefka on July 29, 2001 at 00:22:05:

In Reply to: pointers posted by kalpol on July 27, 2001 at 19:51:36:

: ok i've figured out the problem, and i feel like i ought to know this, but i don't. How do i change which object a pointer is pointing at, and not the object???

Well... wouldn't it be something like

Obj * tempPtr = oldObjectPtr;
oldObjectPtr = & newObject (OR) oldObjectPtr = newObjectPtr;
and maybe delete tempPtr


Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ CS328 Message Board ] [ FAQ ]