Hi Please don't cross-post. If you do, CC other mailing lists.
On Thu, 28 Mar 2002, Jeff wrote: > Hi, > > My problem is ctrl-d or ctrl-z das not send the EOF(end of file signal) to > the program running (I get ^z or ^d on the screen). > The sys. is slackware8.0 KDE emacs g++. What version of g++ ? What terminal do you work in? What is $TERM? Do you happen to work in a emacs terminal emulation? Ctrl-Z is usually Suspend, rather than EOF. Ctrl-D is EOF. But it will only send EOF if it in the beginning of a line. Press Enter first. It works for me (g++ 2.96 from Mandrake 8.1 with updates) The only warning I got was on the fact that you used 'void main' instead of 'int main' > As I'm desperate ;>) > On a win2000 with MS. visual 6.0 & dev-c++ not working too. > > Any help is appreciated. > > Thank, > Jeff > #include <iostream.h> > > void main() > { > > int sum = 0, num; > cout << " enter a #"; > cin >> num; > while (!cin.eof()) > { > sum = sum + num; > cout << " enter a #"; > cin >> num; > } > cout << "sum:" << sum <<endl; > } -- Tzafrir Cohen mailto:[EMAIL PROTECTED] http://www.technion.ac.il/~tzafrir -------------------------------------------------------------------------- Haifa Linux Club Mailing List (http://linuxclub.il.eu.org) To unsub send an empty message to [EMAIL PROTECTED]