Thread: arrays

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    142

    arrays

    i just want to know can you use arrays to store sentences and acces them la8tr or am i going in completly the wrong direction ?

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    If I understand correctly, no. You need to make files (look up a tutorial on fstream)

    I'm off to school

  3. #3
    aoeuhtns
    Join Date
    Jul 2005
    Posts
    581
    Yes, you can use arrays to store sentences and access them later. They're called character arrays; some call them strings. They last as long as the program is running. I guess the operative question would be, "How much later do you want to use them? Within the same process, or another time the program is started?" Or is it "How much la8tr?" (....?)

  4. #4
    Registered User
    Join Date
    Sep 2005
    Posts
    142

    okey dokey

    well thank you, i'm not planning on using arrays just yet, i just wanted to know if i was grasping what i was reading on paper.
    i can definatly see an advantage to using arrays for holding strings, but can you store them perminatly using arrays?

  5. #5
    Moderately Rabid Decrypt's Avatar
    Join Date
    Feb 2005
    Location
    Milwaukee, WI, USA
    Posts
    300
    If you want to store data (an array or otherwise), you need to store it in a file. As MadCow suggested, look up a tutorial on fstream.
    There is a difference between tedious and difficult.

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