Well, when I try to run it, it freezes |
This probably means you're stuck in an infinite loop somewhere. This is a very easy problem to debug.
When this freeze happens, go into the debugger and tell it to break (in VS, this is the "Break all" option in the "Debug" menu).
The debugger will snap as if you hit a breakpoint. From there you can look at the code being executed and figure out which loop it's getting stuck in and why.
If the debugger snaps and takes you to code that isn't yours, or says it doesn't have the source for whatever file.... then that just means you need to go up in the call stack. Make sure the callstack window is open ("Debug -> Windows -> Call Stack" from the menu) and go down the list until you get to code you recognize).
If you need to, you can step through the code with "Debug -> Step Over" and "Debug -> Step Into" and can look at the contents of any variable with "Debug -> Windows -> Watch" (just type a variable name into the Watch window and it will give you the contents).
This is basic debugging. Now is the time to learn it.
I would look at this myself, but I don't have SDL installed and am too lazy to get it.
EDIT: ninja'd with a solution