| delorie.com/archives/browse.cgi | search |
| Date: | Sun, 8 Nov 92 16:29:21 -0700 |
| From: | jan kok <kok AT CS DOT ColoState DOT EDU> |
| To: | djgpp AT sun DOT soe DOT clarkson DOT edu |
| Subject: | cout.flush hangup |
Maybe someone (not me) will want to fix this. I guess the workaround is
to output a newline occasionally.
- Jan
// This fails with a freshly installed djdev109, djgpo222, etc.
// The program prints about 512 x's, then the computer hangs and must be
// rebooted. Removing the cout.flush OR adding a \n after the x prevents
// any problems.
#include <iostream.h>
main()
{
while (1) {
cout << "x";
cout.flush();
}
}
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |