Original Post
My program keeps on crashing saying I'm dividing by zero even though I have a check to make sure that I'm not dividing by zero, why?
DWORD last_time = 0, elapsed = 0;
int FPS = 0;
//
while(running == true)
{
elapsed = GetTickCount() - last_time;
if(elapsed == 0) elapsed == 1;
last_time = GetTickCount();
//
FPS = 1000/elapsed;
}