K
Kristo
Is there a preference between getchar and cin for reading one character
at a time from stdin? TC++PL chapter 6 has a parser that uses getchar,
but I suspect that the purists will say to always go with cin.
Naturally, the former is probably faster. However, in the context of
writing a parser, I think istream's skipws and noskipws manipulators
could be useful. Opinions?
Kristo
at a time from stdin? TC++PL chapter 6 has a parser that uses getchar,
but I suspect that the purists will say to always go with cin.
Naturally, the former is probably faster. However, in the context of
writing a parser, I think istream's skipws and noskipws manipulators
could be useful. Opinions?
Kristo