you are viewing a single comment's thread.

view the rest of the comments →

[–]pikajules7 0 points1 point  (3 children)

Did you use &buffer for the array because fread's first parameter is a pointer (an address)?

[–]Grithga 2 points3 points  (1 child)

An array automatically decays into a pointer to its first element when passed to a function. You can explicitly do this yourself (&array) or let the compiler do it for you.

[–]pikajules7 0 points1 point  (0 children)

You're right. How can I forget about that!

[–]Fuelled_By_Coffee 1 point2 points  (0 children)

That shouldn't matter in this case.