• Advertisement

RabidLurker

Member
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

123 Neutral

About RabidLurker

  • Rank
    Newbie

Personal Information

  • Interests
    Programming
  1. Constructor and Scope Issue

    I'm not sure calling this a "scope limitation" captures the essence of the issue; the bullet doesn't exist beyond the '}' (its destructor is called). One way to get around this is to create bullet on the heap instead of on the stack. There are other ways (e.g. you could create a collection of Projectile objects, manage their lifetimes, and reuse them).
  • Advertisement