Search:

Type: Posts; User: simran

Search: Search took 0.01 seconds.

  1. Thread: File I/O in C++

    by simran
    Replies
    8
    Views
    1,954

    Hi outfile.open ("test.txt",ios::in |...

    Hi


    outfile.open ("test.txt",ios::in | ios::out |ios::ate );

    works. It does not overwrite the existing contents plus it replaces the text from "an apple" to "a sample"

    Thansk a lot.
  2. Thread: File I/O in C++

    by simran
    Replies
    8
    Views
    1,954

    Hi I tried it again. This is not working for...

    Hi

    I tried it again. This is not working for me. I checked the text.txt file. It contains "This is an apple" only.
    What could be the problem?

    Thanks.
  3. Thread: File I/O in C++

    by simran
    Replies
    8
    Views
    1,954

    Thank you for replying. I tried this way too....

    Thank you for replying.

    I tried this way too. if i open the file like
    outfile.open ("test.txt",ios::out|ios::ate);
    or
    outfile.open ("test.txt",ios::ate);

    it overwrites the contents of...
  4. Thread: File I/O in C++

    by simran
    Replies
    8
    Views
    1,954

    File I/O in C++

    Hi

    I am witing a program to change the the text in a file from "This is an apple" to This is a sample". I need to open the file in append mode too for adding text afterward.
    The code for program...
Results 1 to 4 of 4