|
From: kalb <ka...@em...> - 2006-01-10 17:56:04
|
Try typing <Ctrl-Z> instead of <Enter>, you'll be surprised...
kalb
Gary Lefebvre wrote:
> #include <stdio.h>
>
> #include <stdlib.h>
>
>
>
> main()
>
> {
>
> long nc;
>
>
>
> nc=0;
>
> for (nc=0; getchar()!=EOF; ++nc);
>
> printf("%ld\n",nc);
>
> system("Pause");
>
> return 0;
>
> }
>
>
>
> No matter what loop option I try I have the same result. The loop does
> not terminate when, after entering text, I press the enter key. The
> command window hangs. The loop will not terminate to proceed to the
> rest of the code.
>
--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f
Sponsor:
Cerchi lamore? Allora iscriviti gratis a Meetic: troverai migliaia di single in linea e potrai chattare con loro.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=4049&d=10-1
|