|
From: Noorez K. <lor...@ho...> - 2005-12-17 01:40:11
|
I have a program that needs to read in a file only 500 chars at a time. I
found this example in a tutorial but am confused about a part of it.
ifstream file ("example.txt", ios::in|ios::binary|ios::ate);
if (file.is_open())
{
size = file.tellg();
memblock = new char [size];
file.seekg (0, ios::beg);
file.read (memblock, size);
file.close();
...
When file.read() is called, does it move the file pointer, or do i have to
do it? If i have to move it to read the next 500 chars, would i set the
pointer at the value 500?
_________________________________________________________________
Take charge with a pop-up guard built on patented Microsoft® SmartScreen
Technology
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=1034&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines
Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
|