Hi,
When I set a local variable to a value it causes a segmentation fault. This happens in the GameObject class in the setGame method.
I have no idea what is causing this problem so I have uploaded the entire project could you please take a look to see if you can find the problem. While your at it tell me what you think of the design. Am I on the right track? if not state why.
Rewrite your whole program if you need to. No one is going to dig through your code if you just dump it all at once. Although this is general c++, this breaks rules in the beginners rules topic http://www.cplusplus.com/forum/beginner/1/, can someone confirm that it applies to both subsections?
Its not much code that is written. It is just a template at the moment. I want to design the structure before I start using the 3d engine ect. I thought it would be a requirement for me to send all the code as I have never come across this problem in my life and have no idea what it could be. An object shouldn't have segmentation faults when setting its local variables.
Thats how I know it crashes when a set a local variable in the GameObject class in the setGame method.
A stack trace would be immensibly helpful here. What called said setGame()? Was the parameter a valid pointer? Was setGame() called on valid GameObject instance?
I tried to buid it and after fixing some errors, I got this in stack trace: #0 ?? GameObject::setGame (this=0x0, game=0x5b4448) Basically you are calling setGame on null pointer.