|
From: Per W. <pw...@ia...> - 2007-07-19 17:14:39
|
Please don't unlink from the mailing list. 1) Your code will not get any data to process until you press enter. Then all characters up to the new-line will be processed one-by-one. 2) Your code will not leave the while loop until it gets an end-of-file, which it gets when you press Ctrl-C in Windows, and Ctrl-D on Unix systems. - Run your program. - Enter a sentence. - Press Enter. - Press Ctrl-C. - Read the statistics from the sentence. /pwm On Thu, 19 Jul 2007, dan...@li... wrote: > > My guess is that he hasn't realized that he has to press Ctrl-C to to end= the program > > > It's not that the problem, i think it's that i don't know hoe to go out f= rom the While(..) comand, because i write some phrases but i don't have any= count from the program in output, as you can try. I think i didn't put an = "end of file" comand in the While() so i can't go out from this > > Danilo > > ---------- Initial Header ----------- > > >From : dev...@li... > To : "Adam Jones" aj...@i-... > Cc : "dev-c++ devc++" dev...@li... > Date : Thu, 19 Jul 2007 16:11:33 +0200 (CEST) > Subject : Re: [Dev-C++] Question > > > > > > > > > He did send the source as an attachment, but did not clearly specify wh= at > > problem he has with this school assignment. > > > > My guess is that he hasn't realized that he has to press Ctrl-C to end = the > > program (or Ctrl-D if run on a Unix machine). > > > > /pwm > > > > On Thu, 19 Jul 2007, Adam Jones wrote: > > > > > >>Hello, > > > > > > >>I have a problem with this program: when a give the execute comand = the > > > *.exe window opens but after I give the characters to switch as You c= an see > > > on the While comand : >>while ( cin >> ch ) I can't make the executio= n of > > > the program. > > > > > > >>There's a specific comand to give on the *.exe window for running t= he > > > execution after writing on it? > > > > > > >>Many Thanks > > > > > > >>Danilo > > > > > > Unfortunately I am not sure what you are asking. If the program is no= t > > > large, post the source code. How do you know that the code is not run= ning?? > > > Maybe it is running, but you haven't paused executive so you can see = the > > > output. If you don't pause the executive the cin will get the input, = the > > > program will do what it has to do and then close the console window. > > > > > > -Adam Jones > > > > > > > > > > > > ---------------------------------------------------------------------= ---- > > > This SF.net email is sponsored by DB2 Express > > > Download DB2 Express C - the FREE version of DB2 express and take > > > control of your XML. No limits. Just data. Click to get it now. > > > http://sourceforge.net/powerbar/db2/ > > > _______________________________________________ > > > Dev-cpp-users mailing list > > > Dev...@li... > > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > > > > > -----------------------------------------------------------------------= -- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > ------------------------------------------------------ > Leggi GRATIS le tue mail con il telefonino i-mode=99 di Wind > http://i-mode.wind.it/ > > |