RE: [Dev-C++] possible bug of MinGW compiler
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2001-10-23 08:41:46
|
> -----Original Message----- > From: Luigi Santillo [mailto:gi...@li...]=20 > Sent: Monday, October 22, 2001 8:07 PM > To: Ioannis Vranos > Subject: RE: [Dev-C++] possible bug of MinGW compiler >=20 > Ok, It is clear now. I did not check for the '\n' because I=20 > did not want=20 > the program to print output on a line basis, but I wanted=20 > only one final=20 > count, even when input comes from the keyboard. You can look for a double '\n', i mean press enter twice, or a special combination of characters. > >You can even check argc and argv to see if you provided any argument=20 > >with > >'<' and it to assume automatically that you have redirected=20 > input, so when=20 > >it finds '<' to use EOF, when it doesn't find any '<' to use '\n'. >=20 > ?? ... now I'm a bit confused :-). >=20 > I have always thought that redirection has to do with the=20 > shell, in other=20 > words, a program has no way to detect if stdin is the console=20 > or if it has=20 > been redirected. In fact the following code: Yes, you are right, i checked it and it doesn't work. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.f2s.com * Alternative URL: http://run.to/noicys |