|
-
December 21st, 2008, 03:12 PM
#4
Re: Pointer problem
nvm I fixed it, I was being very dim. It was assigning my pointer a random garbage value rather than 0 and to avoid memory leaks a segment of my code has a delete in it, and that caused the segmentation fault I think. It for some reason didn't print anything I told it to, which is why I assumed it was a problem with the declaration. I fixed it by putting ptr=0; at the beginning of all my constructors (I am definitively a noob in the world of programming).
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|