Re: [Dev-C++] Why is this code not doing what it should do? (simple example code from book)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Luigi S. <gi...@li...> - 2003-05-26 10:13:00
|
> > From: Keats [mailto:ke...@ih...] > > Sent: maandag 26 mei 2003 2:39 > > Hi, > > [...] > > to me there is another error in the code, apart from the one Papa > > Smurf found. You declared 'c' as a int, shouldn't this be a > > declared as a char or string or are these operations > > allowed in C/C++? > > When reading a stream on a one character basis, it could happen to find some input which does not fit within a "char" frame; the end of file marker (EOF) obtained as CTRL+z (or CTRL+d on *nix), which is an "int", is probably the best known example. -- >> gisan >> |