473,324 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Looking for a library function!!

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.

Aug 9 '06 #1
4 1220
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.
Aug 9 '06 #2

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();

Aug 9 '06 #3
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.
Aug 9 '06 #4
On Wed, 9 Aug 2006 04:48:45 UTC, "Hans" <ha*********@gmail.comwrote:
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!
Aug 9 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Robin Cull | last post by:
Hi all, I'm writing a script that needs to do lookups on the UNIX passwd and groups file on textual usernames/group names and return numeric UID/GID. Something that gives access to the C...
3
by: Glenn C. Rhoads | last post by:
I'm having a problem calling a C function from a publicly available library file. To get the code to compile, I had to declare the function as an external C function as follows. extern "C"...
14
by: Billy Patton | last post by:
I'm not student, looking for homework help. I'm looking for a c function that will execute a system function then return the output into a string. I don't want to use a file as a medium. pipe...
25
by: JeffS | last post by:
Honest, I scoured the comp.lang.c.faq for this but found nothing. :) Is there a library function for placing the cursor position in the console? Or is it something that can only be done with a...
19
by: Deniz Bahar | last post by:
Hi, I would like to call one of my functions the exact name as an existing C library function (for example K&R2 exercises asks me to make an atof function). If I don't include the header with...
7
by: whatluo | last post by:
Hi, all I'm now working on a program which will convert dec number to hex and oct and bin respectively, I've checked the clc but with no luck, so can anybody give me a hit how to make this done...
1
by: perrone123 | last post by:
Hi all, I'd like write a function that would open up a browser (internet explorer) that displays the contents of an html file that resides inside the same project as the class library function.
2
by: Lady dyna | last post by:
Get the current date and time from library function localtime() and display it. You have to include time.h The prototype of this function is given in time.h Sample Output Today is Tuesday 3rd...
6
by: Sanchit | last post by:
Library Function for converrting double to string in GCC. -Thanks Sanchit
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.