Vectors : Which end?

This is a discussion on Vectors : Which end? within the C++ Programming forums, part of the General Programming Boards category; When you the push_back method on a vector, does it add it to the front or back (that sounded reallly ...

  1. #1
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68

    Vectors : Which end?

    When you the push_back method on a vector, does it add it to the front or back (that sounded reallly stupid, did it not?) Or, more specifically, say i had a vector with five elements in it already, and i use push back to add a new element. Does it end up at offset 0, or offset 5?
    Ph33r the sphericalCUBE

  2. #2
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    push_back pushes it onto the end .
    Do not make direct eye contact with me.

  3. #3
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    I guess you're telling me to test it out
    Darn... did you mean the larger-offset end or the 0-offset end?
    Ph33r the sphericalCUBE

  4. #4
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    I guess you're telling me to test it out
    Darn... did you mean the larger-offset end or the 0-offset end?
    Ph33r the sphericalCUBE

  5. #5
    The Defective GRAPE Lurker's Avatar
    Join Date
    Feb 2003
    Posts
    949
    It adds it to the back - the higher offset .

    Don't double post .
    Do not make direct eye contact with me.

  6. #6
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    double post! ARGGGGGHHHHH!.........
    embarrassment.... how many l33tness point did i just lose here? like, 40 billion or so. *looks for something to blame* Microsoft IE! grrrrrrr......
    Ph33r the sphericalCUBE

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Overwriting all in array, why?
    By guesst in forum C Programming
    Replies: 7
    Last Post: 10-09-2008, 05:56 PM
  2. singly linked to doubly linked
    By jsbeckton in forum C Programming
    Replies: 10
    Last Post: 11-06-2005, 06:47 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  4. socket newbie, losing a few chars from server to client
    By registering in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2003, 11:48 AM
  5. Next Question...
    By Azmeos in forum C++ Programming
    Replies: 3
    Last Post: 06-06-2003, 02:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21