Thread: ios::ate

  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,877
    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