Thread: File i/o & int arrays

  1. #1
    Registered User
    Join Date
    Feb 2006

    File i/o & int arrays

    Hi, I don't know why but I'm having problems reading in an array of integars from a file setup like this:

    "Sect" "0"
    "Clan" "0"
    "Potence" "5"
    "Celerity" "5"
    "Strength" "5"
    "Dexterity" "5"
    "Stamina" "5"
    "Fireamrs" "5"
    "Money" "6850"
    "XP" "43"

    It is a configuration file and I need to have all the numbers in that list so I can change them etc. I'm trying to read them in, and allow them to be changed, someone hook me up with the storing of the variable into an array of integers please.

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Have you tried anything? We tend not to help people who just want a handout.
    My best code is written with the delete key.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell

    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ:

    My website:
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code review
    By Elysia in forum C++ Programming
    Replies: 71
    Last Post: 05-13-2008, 09:42 PM
  2. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. easy if you know how to use functions...
    By Unregistered in forum C Programming
    Replies: 7
    Last Post: 01-31-2002, 07:34 AM