Using Vectors in C++

This is a discussion on Using Vectors in C++ within the C++ Programming forums, part of the General Programming Boards category; Hello everyone i need to use vectors to store banking account information, i.e. First name Last name, SSN, balance, accout ...

  1. #1
    matnace
    Guest

    Using Vectors in C++

    Hello everyone i need to use vectors to store banking account information, i.e. First name Last name, SSN, balance, accout number, etc.., and then use the account number to retrieve the specified account information back. I know linked list would be alot easier but its a extra credit for class and the criteria calls for using vectors

  2. #2
    Still A Registered User DISGUISED's Avatar
    Join Date
    Aug 2001
    Posts
    499
    Ok so what do you need help with?

  3. #3
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    read this

  4. #4
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    struct Accnt
    {
    ...
    };


    struct Accnt nMember;
    vector<struct Accnt> vAccnt;

    ...(loop)
    vAccnt.push_back (nMember);
    ...

    Do something like that. Use iterators in the loop to represent each element (struct member).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Vectors
    By naseerhaider in forum C++ Programming
    Replies: 11
    Last Post: 05-09-2008, 09:21 AM
  2. How can i made vectors measuring program in DevC++
    By flame82 in forum C Programming
    Replies: 1
    Last Post: 05-07-2008, 03:05 PM
  3. How properly get data out of vectors of templates?
    By 6tr6tr in forum C++ Programming
    Replies: 4
    Last Post: 04-15-2008, 11:35 AM
  4. How to use Vector's in C++ !?!
    By IndioDoido in forum C++ Programming
    Replies: 3
    Last Post: 10-14-2007, 12:13 PM
  5. Points, vectors, matrices
    By subnet_rx in forum Game Programming
    Replies: 17
    Last Post: 01-11-2002, 02:29 PM

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