Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

SDL Program problems

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 Lewis De Angelo   Members   

108
Like
0Likes
Like

Posted 02 December 2012 - 09:53 AM

Hello, I'm relatively new to SDL and I'm having a pretty annoying issue right now. Whenever I initialise a Player object, the game instantly quits upon execution. However, if I don't, the game runs fine.

PLAYER.H - http://pastebin.com/4wACH9dj
PLAYER.CPP - http://pastebin.com/xuv51qBX
GAME.H - http://pastebin.com/0TnpFWp4
GAME.CPP - http://pastebin.com/2YdKJjmr
MAIN.CPP - http://pastebin.com/ttsn3bVY

I'd be grateful if someone skimmed what I've typed and would help. Thx.

#2 rip-off   Moderators   

10897
Like
0Likes
Like

Posted 02 December 2012 - 11:24 AM

You don't appear to have much error handling. You have some error checking, but the errors aren't correctly propagated all the way up. Have you tried running the code in a debugger? This will allow you to pinpoint the line that is causing the problem.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.