From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,9b28d01c57e06ef1,start X-Google-Attributes: gid109fba,public X-Google-Thread: 1164f8,9b28d01c57e06ef1,start X-Google-Attributes: gid1164f8,public From: ehrhart.jeffrey@mayo.edu (Jeffrey T. Ehrhart) Subject: DEC Alpha C++ problem Date: 1995/08/28 Message-ID: <41tefq$68p@fermat.mayo.edu>#1/1 X-Deja-AN: 109002727 organization: Mayo Foundation, Rochester MN newsgroups: comp.lang.c++,comp.sys.dec I am having a problem with the DEC Alpha C++ fstream functions. My code looks like this: xfile.open("test.txt", ios::in); char delimiter[6]; xfile.getline(delimiter, 7); // Read first 6 characters xfile.seekg(0); // Reset to file beginning xfile.sync(); // Sync file and fstream buffer The problem is that the next getline invocation does not read from the beginning of the file like I wanted it to. It appears as if either the seekg or sync functions did not work as I expected. Do I need to do something different to move the file pointer back to the beginning of the file? Is it a problem with the DEC C++ library functions? HELP !!! This code works as expected under Visual C++ on the PC and the CC compiler on a SUN. Any help would be appreciated...thanks, Jeff Ehrhart