>>char *str="abcd";
There are two objects here -- the pointer itself is a variable that is on the stack. It contains the address of the string that is stored in the heap -- often in read-only memory.
[edit]Sorry Holly I didn't see your last post when I posted this. The link you posted is a much better and thorough explaination.[/edit]
Last edited by Ancient Dragon; Sep 7th, 2006 at 8:38 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Offline 21,952 posts
since Aug 2005