Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 2750 - ios::ate broken
Summary: ios::ate broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: libstdc++
Version: 6.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-05-12 00:02 UTC by Red Hat Bugzilla
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-15 04:15:38 UTC


Attachments (Terms of Use)

Description Red Hat Bugzilla 1999-05-12 00:02:46 UTC
The openmode element ios::ate of the Standard C++ I/O
library does not work. When a file has been opened, the file
position pointer is still at the beginning. This breaks any
C++ program that use ios::ate upon opening a file to seek to
the end of the file immediately, without doing an explicit
seekg(0,ios::end). In RHL 5.2 it works fine.

Comment 1 Red Hat Bugzilla 1999-05-16 19:14:59 UTC
#include <iostream.h>
#include <fstream.h>

int main(int, char*[])
{
    ifstream
inFile("PUT_YOUR_FILENAME_HERE",ios::in|ios::binary|ios::nocreate|ios::ate);
    cout << "filesize is " << inFile.tellg()
        << ", but should be ";
    inFile.seekg(0,ios::end);
    cout << inFile.tellg() << endl;
    exit(0);
}

Comment 2 Red Hat Bugzilla 2000-05-22 14:53:59 UTC
assign to jakub


Note You need to log in before you can comment on or make changes to this bug.