xtreampb Posted March 24, 2013 Share Posted March 24, 2013 Hey all, I like to do all my games in pure C++. With that said i seam to be having an issue with create my own object. My object is basically 6 models. In my header file, if I create them with as a pointer then use the load, if i try to do anything else with them such as Hide() it throws a bad access error, as if it was never stored in memory, or the mem address was lost. If i create them as a normal var, no issues. No issues that is until i try to terminate the problem. then it frees my object then tries to free it a second time, of course crashing the program saying that it tried to free an unallocated memory address. Anyone got any suggestions Thank you, Xtreampb Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
xtreampb Posted March 24, 2013 Author Share Posted March 24, 2013 Silly me. Went and double checked the document reference. CPP file needs to be this->ModelName=Model::Load("myPath"); Quote bool Life() { while(death=false) { if(death==true) return death; } } I have found the secret to infinite life Did I help you out? Like my post! Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.