Thread: Arrays

  1. #1
    Registered User
    Join Date
    Jul 2007
    Posts
    75

    Exclamation Arrays

    I want to store multiple strings in an array. I have made an array, but I do not know how to get multiple string inputs to store in the array. Please post code

    Thanks

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    how about an array of arrays?

  3. #3
    pwns nooblars
    Join Date
    Oct 2005
    Location
    Portland, Or
    Posts
    1,094
    Read your recommended text on how to use arrays, I assume you are a student. If not, google C++ Array and start reading... perhaps just read the link in my sig.

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Code:
    std::vector<std::string> stringArray;
    stringArray.push_back( "Hello" );
    stringArray.push_back( "World" );
    ...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. pointers & arrays and realloc!
    By zesty in forum C Programming
    Replies: 14
    Last Post: 01-19-2008, 04:24 PM
  2. Replies: 16
    Last Post: 01-01-2008, 04:07 PM
  3. Need Help With 3 Parallel Arrays Selction Sort
    By slickwilly440 in forum C++ Programming
    Replies: 4
    Last Post: 11-19-2005, 10:47 PM
  4. Building B-Tree from Arrays
    By 0rion in forum C Programming
    Replies: 1
    Last Post: 04-09-2005, 02:34 AM
  5. Crazy memory problem with arrays
    By fusikon in forum C++ Programming
    Replies: 9
    Last Post: 01-15-2003, 09:24 PM