home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD Actual 13
/
CDA13.ISO
/
cdactual
/
demobin
/
share
/
program
/
C
/
ANSICPP.ZIP
/
EX10023.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-07-24
|
272 b
|
16 lines
// ex10023.cpp
// The tellg function
#include <fstream.h>
main()
{
ifstream tfile("test.dat");
while (!tfile.eof()) {
char ch;
streampos here = tfile.tellg();
tfile.get(ch);
if (ch == ' ')
cout << "\nPosition " << here << " is a space";
}
}