Timeline for Why is fread second argument sizeof(x) and third 1?
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 11, 2017 at 15:59 | comment | added | toyotasupra | But why is the 3rd argument 1? | |
| Dec 10, 2014 at 2:12 | comment | added | abelinux | Fair enough @Kareem . I improved my answer, based on your comments, for future reference. Thanks! | |
| Dec 10, 2014 at 2:11 | history | edited | abelinux | CC BY-SA 3.0 | specified details based on @Kareem's comment |
| Dec 9, 2014 at 21:24 | comment | added | kzidane | Just for the sake of accuracy: 1. you don't write data into ptr, you write it into the location in memory that is pointed to by ptr and 2. the cursor is often referred to as the file position indicator. | |
| Dec 9, 2014 at 16:48 | comment | added | abelinux | Here is the same question answered ;) | |
| Dec 9, 2014 at 16:42 | comment | added | RexYuan | What's a "short item count"? | |
| Dec 9, 2014 at 16:41 | vote | accept | RexYuan | ||
| Dec 9, 2014 at 16:02 | comment | added | abelinux | Please see my updated answer @RexYuan , hope it's clearer now | |
| Dec 9, 2014 at 16:02 | history | edited | abelinux | CC BY-SA 3.0 | added 530 characters in body |
| Dec 9, 2014 at 15:47 | comment | added | RexYuan | and how does fread going to read through my entire file if it only read it once and only one element? Isn't that going to just read in the same data over and over again? | |
| Dec 9, 2014 at 15:39 | history | answered | abelinux | CC BY-SA 3.0 |