| ▲ | mort96 2 hours ago | |||||||
Wait, is that wrong? I always call fread as:
with the rationale that I'm interested in reading sizeof(buffer) individual bytes. The buffer size is incidental, not the size of the items I'm trying to read from the file; "read one item whose size is sizeof(buffer)" seems semantically wrong.Is this just the case of Windows having a bad stdlib fread implementation 15 years ago or is my thinking here actually wrong? | ||||||||
| ▲ | chadgpt3 2 hours ago | parent [-] | |||||||
It's not wrong. Guy just wrote a bad implementation of fread and blamed everyone else. | ||||||||
| ||||||||