www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/10/10:41:14

Message-Id: <199802101539.HAA26219@denmark.it.earthlink.net>
Date: Tue, 10 Feb 1998 08:37:01 -0700
To: Charbel Sadaka <z2193115 AT student DOT unsw DOT edu DOT au>
From: Kurt Wall <krwall AT earthlink DOT net>
Subject: Re: Hi
Cc: djgpp AT delorie DOT com
In-Reply-To: <34E03363.1A28E21C@student.unsw.edu.au>
Mime-Version: 1.0

At 10:00 PM 2/10/98 +1100, you wrote:
> Hi ,
>I'm Charbel (or just Charlie if you prefer), and would really appreciate
>it if you could solve this simple problem I have.
>
>I've downloaded the c compiler from delorie.com for win95(ieDOS)and have
>no problems with it except that I've tried writing a simple program to
>read from the stdin and count the number of characters in it using the
>following code:
>     while (ch=getchar( ) != EOF) {
>                 count++
>    }
>
Assignment has higher precedence than the relational operator, so try
     while ((ch=getchar()) != EOF) {
          count++;
     }
Under DOS/Windows, Use CTRL+Z to signal EOF from the keyboard, not CTRL+D.

>The program compiles and all except at university we use unix and to
>terminate the above
>program ^D stands for EOF.  The problem is I can't seem to do the same
>in DOS since I can't find a similar command. If you how to solve this
>problem I'd greatly appreciate it,
>but if you don't know I guess I'll keep banging my head against a brick
>wall!!
>
>Thankyou for your time
>
>Charbel Sadaka
>
>PS:By the way you can email at z2193115 AT student DOT unsw DOT edu DOT au or
>
>s2193115 AT cse DOT unsw DOT edu DOT au
> 

Kurt
-----
Flames expected, accepted and excepted.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019