Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Looking for a library function!!

Reply
Thread Tools

Looking for a library function!!

 
 
Hans
Guest
Posts: n/a
 
      08-09-2006
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.

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      08-09-2006
Hans wrote:
> 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()

--
Ian Collins.
 
Reply With Quote
 
 
 
 
zhao.kaiyong@gmail.com
Guest
Posts: n/a
 
      08-09-2006

Hans wrote:
> 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();

 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      08-09-2006
Hans wrote:
> 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.
--
Flash Gordon
Sigless on this computer.
 
Reply With Quote
 
Herbert Rosenau
Guest
Posts: n/a
 
      08-09-2006
On Wed, 9 Aug 2006 04:48:45 UTC, "Hans" <(E-Mail Removed)> wrote:

> 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!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Static library Vs. Dynamic library iceColdFire C++ 3 05-17-2005 06:16 AM
Dynamic Library or Static Library under Linux gouqizi.lvcha@gmail.com C++ 6 05-10-2005 03:16 PM
Re: Difference between Web Control Library and Class Library Alan Ferrandiz [MCT] ASP .Net 0 09-11-2004 01:51 PM
Re: Difference between Web Control Library and Class Library Mythran ASP .Net 0 08-24-2004 05:53 PM
Library in library... Sweep C++ 1 12-09-2003 04:12 AM



Advertisments