Computer Science Canada SDL Rect array problem |
Author: | DrummaBoyFB [ Sun Sep 19, 2010 10:51 pm ] |
Post subject: | SDL Rect array problem |
Hi. I'm making a game using the SDL Library and I'm having trouble with SDL_Rect. I wanted to make an array of SDL Rect Ex: SDL_Rect shoot [10000]; but everytime I make an array it always gives me an error. As soon as I run the game , it shuts down and says it has encountered an error and I don't know what to do to make it work. If anybody could tell me how to use arrays with SDL_Rect or a different approach to movement. My main goal is to make my player able to shoot multiple bullets at a time but I can't do this because of my array problem so if there's another way to do it please help. |
Author: | TheGuardian001 [ Mon Sep 20, 2010 6:53 am ] |
Post subject: | Re: SDL Rect array problem |
DrummaBoyFB @ Sun Sep 19, 2010 10:51 pm wrote: an error.
Which error? There are lots of them. Is the error coming from SDL, or from the compiler? What specifically does it say? |
Author: | DrummaBoyFB [ Mon Sep 20, 2010 2:06 pm ] |
Post subject: | Re: SDL Rect array problem |
The program compiles but then as soon as the screen pops up for the game something pops up and says Simple Game.exe Has stopped working Windows is checking for a solution to the problem. This only happens when I make SDL_Rect and array Ex: SDL_Rect rect [100]; when it's not an array it works fine but I need it to be an array. |