Hi Guys,
Here is my code. I have 4 rows in a file. I have opened the file using CFILE Open and then I am using CArchive to ReadString from the file. When I do a SeektoBegin it should go to the top of the file and then when I do a ReadString it should read the first row. Instead it shows me the last row. I have tried using Seek but the same result. I want to move the file position as and when I want. Any suggestions ?
if(ArTempINDFile.ReadString(EntireStringA)==FALSE)
{
CheckingDups=FALSE;
break;
}
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
TempSortedFile.SeekToBegin();
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
Thanks
Premal
Here is my code. I have 4 rows in a file. I have opened the file using CFILE Open and then I am using CArchive to ReadString from the file. When I do a SeektoBegin it should go to the top of the file and then when I do a ReadString it should read the first row. Instead it shows me the last row. I have tried using Seek but the same result. I want to move the file position as and when I want. Any suggestions ?
if(ArTempINDFile.ReadString(EntireStringA)==FALSE)
{
CheckingDups=FALSE;
break;
}
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
TempSortedFile.SeekToBegin();
ArTempINDFile.ReadString(EntireStringA);
MessageBox(EntireStringA);
Thanks
Premal