Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Object vector not re-adding items  (Read 1237 times)

0 Members and 1 Guest are viewing this topic.

Aiden_Cohen

  • Newbie
  • *
  • Posts: 9
    • View Profile
    • Email
Object vector not re-adding items
« on: April 06, 2018, 02:31:57 am »
I am currently making a snake game in c++, but have encountered this problem. In order to make my snake, I have been using a vector full of objects of rectangles, and drawing them to where my snake goes. However, I have run into a problem. At first, my snake would be infinite as I would keep drawing more rectangles to put into the vector. However, when I try to clear the vector at the bottom of my program, none of the rectangles get redrawn, and I'm left with a tiny snake on the screen.
« Last Edit: April 16, 2018, 09:15:46 pm by Aiden_Cohen »

 

anything