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?