Looking for a library function!!

H

Hans

Hi all,
Is anyone aware of any existing library functions that directly read
only a fixed number of bytes?? I dont wanna use scanf or put getchar()
in a loop.. any other suggestions???
Thanks in advance,
Hans.
 
I

Ian Collins

Hans said:
Hi all,
Is anyone aware of any existing library functions that directly read
only a fixed number of bytes?? I dont wanna use scanf or put getchar()
in a loop.. any other suggestions???

fread()
 
Z

zhao.kaiyong

Hans said:
Hi all,
Is anyone aware of any existing library functions that directly read
only a fixed number of bytes?? I dont wanna use scanf or put getchar()
in a loop.. any other suggestions???
Thanks in advance,
Hans.

open file by bit style, and fread();
 
F

Flash Gordon

Hans said:
Hi all,
Is anyone aware of any existing library functions that directly read
only a fixed number of bytes?? I dont wanna use scanf or put getchar()
in a loop.. any other suggestions???

I'm sure lots of people are aware of such functions. What you are
looking for is probably fread. As always, read your text book and check
the return value when using it.
 
H

Herbert Rosenau

Hi all,
Is anyone aware of any existing library functions that directly read
only a fixed number of bytes?? I dont wanna use scanf or put getchar()
in a loop.. any other suggestions???
Thanks in advance,
Hans.
fread().

Or use simply getc() or getchar() to read byte after byte.

--
Tschau/Bye
Herbert

Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top