ios::ate

This is a discussion on ios::ate within the C++ Programming forums, part of the General Programming Boards category; I have opened a file to write to it and I need to add to then end of the file ...

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    94

    ios::ate

    I have opened a file to write to it and I need to add to then end of the file at different points in time. When I had opened the file, I had used the ios::ate flag.

    A fnct later needs to re-open the file to read the data, but the marker is located at the end of the file (due to ios::ate) and I dont know how to reposition the marker so that it is at the beginning again.

    Does anyone know how to reposition the marker, or am I making a mistake by using ios::ate?

    thanx
    simple is always an understatement.....

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    Look up seekg in your reference manual.
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    94
    Luv ya
    simple is always an understatement.....

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. ios::out question
    By Gnoober in forum C++ Programming
    Replies: 8
    Last Post: 02-21-2003, 06:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21