I wrote this little program to illustrate my problem :
int main(int argc, char* argv[])
{
int i = 0;
while(1)
{
std::cout << i++ << std::endl;
Sleep(1000);
}
return 0;
}
So this simple program will stop counting if you hold the vertical scroll bar ( to watch back logs or whatever …).
Is there a way to avoid this ?
Cheers
Not really. What happens is that holding the scrollbar prevents the application to write any new output to the console, so it eventually blocks on flushing std::cout. This is due to how Windows implements the console and can not be avoided.