|
Linked Lists
Hey,
I am making a asteroids clone and I have a class called "Bullet." Right now I have it so that when you click the space bar, the "Ship" class calls the "Bullet::CreateBullet."
The only problem is that when It tries to add the bullet to the linked list it crashes. Here is some of the code.
Well, I think the problem is in the constructor, but maybe I am using the 'new' thing wrong. I have never used it before. Well thanks a lot guys.
Later.
Edited by - JSCFaith on May 12, 2001 7:37:36 PM
did u declare the pBulletFirst, pBulletPrev as static ?? ..
since i think there will be multiple copies ..
? .. just asking ..
hehe .. i answered same time as beelzebub .. sorry for the duplicate answer
Edited by - jwalker on May 12, 2001 10:29:28 PM
since i think there will be multiple copies ..
? .. just asking ..
hehe .. i answered same time as beelzebub .. sorry for the duplicate answer
Edited by - jwalker on May 12, 2001 10:29:28 PM
I know that pBulletNext and pBulletPrev are not supposed to be static becuase each bullet has to point to the next and prev bullet of itself. Any other ideas.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement