Unsuccessful fread() of int stored in binary file, segmentation fault [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . There seem to be of the order of 10 questions and (mostly) successful answers solving segmentation faults cause by misused fread()'s in C. That being said, I am having such a problem but have not found a solution. I have a binary file containing an int (call it nbins ) and an array of float s (of size nbins ).