• Content count

  • Joined

  • Last visited

Community Reputation

105 Neutral

About LewisDe

  • Rank
  1. Program crashes and vectors

    Hey guys, I need your help. I'm creating a simple space game with SDL and I hold a vector of projectiles. Whenever I attempt to push_back() a new element, the game suddenly ends. Please forgive any n00b mistakes as I'm learning the ropes of C++. The code is posted here: http://pastebin.com/7NAv82Aa and the SpawnProjectile() function is located on line 243.
  2. SDL C++ Program crashing

    I have a bunny who shoots bullets. To ensure that resources aren't being depleted, the game erases that bullet from a vector of bullets when the bullet comes off the screen (when its x value is less than zero). However, whenever the game erases the obsolete bullet, the game ends abruptly. I think this problem has something to do with when the sprite resources are freed. Can anyone please help...   Code: http://pastebin.com/wG6rRqa8   The key lines to acknowledge are lines 441 and the projectile class