That code wasn't complete. I only posted the structure and function because that's all I having trouble with. The code can compile correctly.

The fread() function is what I'm was having trouble with. The arrays are working correctly (well on my side at least)