TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Kurt Kuzba
from: David Van Hoose
date: 1998-09-10 06:53:00
subject: FRead

-> DV> -> - number of elements to read/write
-> DV>   What exactly does that mean??  That is my only question.. Well,
-> suppose you have an array of structs in your app.
-> Now suppose you wish to read in blocks of structs, say 100
-> at a time, into this array. Given the struct MyDAT, with
-> your memory allocated dynamically:
-> MyDAT *datarray = malloc(sizeof(MyDAT) * 100);
-> you could read 100 items into the array simply with fread():
-> fread(datarray, sizeof(MyDAT), 100, FilePointer);
-> You can see how this would be quite useful. :)

Thank you! That is what I was asking the whole time, but no one gave me
a good answer. Again thanks!

-=Dave=-

--- PCBoard (R) v15.4 (OS/2) 250 Beta
* Origin: JaceNet GateWayDestiny BBS: 1-850-477-1262 (1:3612/333)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/218
@PATH: 3612/333 360 366/47 3651/9 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.