|
C Now |
Handle tell Function |
![]() |
The tell function is used to find the current position of a file pointer.
#include <io.h>
. . .
int Account_Master;
char Buffer [100];
int Maximum;
int Actual;
long Pos;
. . .
Maximum = 100;
. . .
Account_Master = open ("accounts.dat", O_RDWR);
. . .
while (!eof (Account_Master)) {
Pos = tell (Account_Master);
Actual = read (Account_Master, Buffer, Maximum);
. . .
/* rewrite the record */
lseek (Account_Master, Pos, SEEK_SET);
Actual = write (Account_Master, Buffer, Maximum);
. . .
}
|
|||||||||||||||||||||
|
|
|
||||||||||
|
copyright 2001-2006, j.h.young, revised 2/13/06 |
The io.h Header File Listing / The Handle close Function / The Handle eof Function / The Handle lseek Function / The Handle open Function / The Handle read Function / The Handle write Function /