Recommended Posts

Are there limits as to how many objects you can have in a function or program in c++? When I had 2 objects in my winmain it would complile but crash and exit when run. I moved one of the objects out of the winmain and made it global and it compiles and run flawlessly. Are there limits on memory for varialbes used in functions and if so what are they and how can they be altered.
OneEyeLessThanNone - needs gramar school.

0

Share this post

Link to post

Share on other sites

not that I know of. I''m assumming that when you say object that means a class... Your problem is probably in the constructor or distructor for the cass(calls on something that hasn''t been initalized yet) use your debug to find where it is....

Great Milenko

Words Of Wisdom:"Never Stick A Pretzel In Your Butt It Might Break Off In There."

http://www.crosswinds.net/~milenkohttp://www.crosswinds.net/~pirotech

0

Share this post

Link to post

Share on other sites

Yes by object I mean class, but I''m not calling something that is not initilized. The new class I introduced has only one function and has no variables in it. Plus if i did called on something it would not matter if its local or global would it? I''ve had this problem before when I had several classes in a funcion.