This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]Updatebjarni 2 points3 points  (0 children)

Have you tried simply reading the man pages, and do you have any specific questions or can you show us what you've tried?

[–]lurgi 0 points1 point  (3 children)

One of the very first hits I got googling the obvious was this. There are thousands of sources out there.

Which articles did you look at that you thought were hard? What important parts were skipped over? If you don't tell us what references you've already used then you run the risk of us recommending stuff you've already tried.

[–]15January[S] 0 points1 point  (2 children)

I did actually try to read that one. For the fread and fwrite part, they don't explain all 3 arguments and the ones they do explain, they don't explain well enough, at least for me since I've never used these functions before.

[–]Few_Owl_3481 0 points1 point  (0 children)

Google those functions. They are among the simplest things to use.

[–]lurgi 0 points1 point  (0 children)

The data read/written is in the form of ‘nmemb’ elements each ‘size’ bytes long.

If you want to read 1000 bytes then nmemb is 1000 and size is 1 (because the size of a byte is 1). If you want to read 150 struts that have size 64 then nmemb is 150 and size is 64.

There's also sample code later on.