vector ?

Discussion in 'C++' started by sd2004, Dec 6, 2005.

  1. sd2004

    sd2004 Guest

    Hi,
    there is "array of structures"
    Is there anything likes "vector of structures" in C++ ?
    Please give me one example.
     
    sd2004, Dec 6, 2005
    #1
    1. Advertising

  2. sd2004 wrote:
    > Hi,
    > there is "array of structures"
    > Is there anything likes "vector of structures" in C++ ?
    > Please give me one example.
    >


    What do you think a "vector" in C++ or programming in general means ?

    Read the FAQ.

    http://www.parashift.com/c -faq-lite/containers.html
     
    Gianni Mariani, Dec 6, 2005
    #2
    1. Advertising

  3. sd2004

    Mike Wahler Guest

    "sd2004" <> wrote in message
    news:...
    > Hi,
    > there is "array of structures"
    > Is there anything likes "vector of structures" in C++ ?


    There is exactly that.

    > Please give me one example.


    #include <vector>

    struct s
    {
    };

    std::vector<s> svec;

    -Mike
     
    Mike Wahler, Dec 6, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. learningjava
    Replies:
    5
    Views:
    2,337
    Miguel De Anda
    Oct 17, 2003
  2. pmatos
    Replies:
    6
    Views:
    24,135
  3. Replies:
    8
    Views:
    2,006
    Csaba
    Feb 18, 2006
  4. Javier
    Replies:
    2
    Views:
    627
    James Kanze
    Sep 4, 2007
  5. Rushikesh Joshi
    Replies:
    0
    Views:
    400
    Rushikesh Joshi
    Jul 10, 2004
Loading...

Share This Page