Simple:
I want to get the size of a file but the following code loops forever and freezes my application:
Code:FILE *file; int filesize; while(!feof(file)) { filesize++; }
What is wrong with this code and why does it freeze?
|
Results 1 to 12 of 12
Thread: Why this is an endless loop?Threaded View
|
Click Here to Expand Forum to Full Width |