Results 1 to 2 of 2

Thread: Reading File in Borland C v3.0

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2000
    Posts
    135

    Question

    HI..
    I need to read a file called 'input.txt' which contains several lines, with different size lengths.. I need to be able to read the whole file and each time i get to a ; i must print the string to the screen.

    for example..

    the file might say something like...

    Hello World; How are you all?;
    Is this working fine or not? Please tell me?

    (Note the last string does not require a ; at the end)

    so when it reads the file i want it to display:
    Hello World
    How are you all?
    Is this working fine or not? Please tell me?

    I know this might sound alot but i'm very new to C and am stuck with what to do here.. Please help me! thanks

  2. #2
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    You will need to use the fstream header

    for a tutorial on it check here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width