Thread: Getting Specific Data from a file

  1. #1
    Registered User darknite135's Avatar
    Join Date
    Dec 2007
    Posts
    16

    Getting Specific Data from a file

    How DO YOU get specific data from a file? Can anyone explain in easy words?

  2. #2
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Open file.
    Read specific data into variable.
    Close file.

  3. #3
    Registered User darknite135's Avatar
    Join Date
    Dec 2007
    Posts
    16

    Talking

    Quote Originally Posted by rags_to_riches View Post
    Open file.
    Read specific data into variable.
    Close file.
    I mean getting one string out of 100 strings. How would you do that? How would you skip down from the file to get the one you want? Ive been working on this for a while and I need some help. Thanks

  4. #4
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    Well, there's just not enough information. For example, what's the format of the text file? How do you know which string you want?

    Why not show us what you have thus far?
    Last edited by rags_to_riches; 01-01-2008 at 09:54 AM. Reason: What not???

  5. #5
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    You more than anyone needs to read this - NOW!:

    http://www.catb.org/~esr/faqs/smart-questions.html
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  2. Writing and modifying data in a file
    By Micko in forum C Programming
    Replies: 2
    Last Post: 02-17-2005, 03:42 AM
  3. Editing a data file
    By Strait in forum C++ Programming
    Replies: 7
    Last Post: 02-05-2005, 04:21 PM
  4. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM