Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

joeG

C++ Static Pointers

This topic is 6846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts


JoeG,

This may be a little offkey..but are you deleting the object held by the vector?

It could be that the problem is in the dtor of the object(s) your vector contains.

HTH,

-mordell

Share this post


Link to post
Share on other sites
Advertisement
Well I already posted this message on the OpenGL forum before I knew about this one, but here's a basic rundown of what I wrote:

The code:

class Object
{
...
static vector instantiatedObjects;
...
};
vector Object::instantiatedObjects =
vector();

Small problem: the vector insantiatedObjects should actually be vector (the type Object* in template brackets) instantiatedObjects. I hope this helps.
The last line is in my main program module. The problem is that my program crashes after the last bit of source code. (I've checked with my debugger) Any suggestions?

JoeG

[This message has been edited by joeG (edited October 19, 1999).]

[This message has been edited by joeG (edited October 19, 1999).]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!