Thread: reading text from a file into your program

  1. #1
    Registered User deltabird's Avatar
    Join Date
    Jan 2003
    Posts
    73

    reading text from a file into your program

    Let me explain before I ask my question.

    You have a program that simply reads a string into a variable, from a text file. Now, there was a program that did this for me, from a tutorial.

    The weird thing was this. I tried messing around with it to see if I could make it mess up. I typed in NULL for the string in the text file, and it woudn't read in the string correctly! I thought it would read in, literally, "NULL", but putting that in made it mess up!

    1) What are some other keywords or special things that could make it mess up?

    2) Why would that have made it mess up, and not take in the string "NULL"?

  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Thats odd. It shouldn't care what the text string is.

    How is it messing up? Can you post the code?
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. reading text file to struct help needed!
    By werdy666 in forum C++ Programming
    Replies: 2
    Last Post: 01-25-2009, 11:37 AM
  2. Inventory records
    By jsbeckton in forum C Programming
    Replies: 23
    Last Post: 06-28-2007, 04:14 AM
  3. reading from text file
    By jamez in forum C Programming
    Replies: 3
    Last Post: 11-30-2005, 07:13 PM
  4. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  5. simulate Grep command in Unix using C
    By laxmi in forum C Programming
    Replies: 6
    Last Post: 05-10-2002, 04:10 PM