Thread: Linked Lists?!

  1. #31
    Gawking at stupidity
    Join Date
    Jul 2004
    Location
    Oregon, USA
    Posts
    3,218
    If you're only calling add_position() twice in main() like it looks like you're doing, then there should only be 2 positions in the list and draw_balls() should only be drawing those 2. But if you add one position, call draw_balls(), add another position, then call draw_balls() again, that's 3 balls total. The original ball being draw from the first draw_balls() call and then the original ball and the new ball from the second draw_balls() call.
    If you understand what you're doing, you're not learning anything.

  2. #32
    Registered User
    Join Date
    Nov 2010
    Posts
    17
    Hmm okay thanks, ill have to think about how im going to get this working.

  3. #33
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by hwing91 View Post
    Hmm okay thanks, ill have to think about how im going to get this working.
    If you have a ball already on screen, telling it now to draw 2 balls totals at three. You probably need to delete the original before drawing the new ones.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Singly Linked Lists: Clarification Needed
    By jedispy in forum C++ Programming
    Replies: 4
    Last Post: 12-14-2006, 05:30 PM
  2. Linked Lists 101
    By The Brain in forum C++ Programming
    Replies: 5
    Last Post: 07-24-2004, 04:32 PM
  3. Map file formats and linked lists
    By Spitball in forum Game Programming
    Replies: 2
    Last Post: 03-04-2004, 11:32 PM
  4. need help w/ linked lists
    By MKashlev in forum C++ Programming
    Replies: 11
    Last Post: 08-05-2002, 08:57 PM
  5. doubly linked lists
    By qwertiop in forum C++ Programming
    Replies: 3
    Last Post: 10-03-2001, 06:25 PM