Add missing low-level peek() to ISstream.

This commit is contained in:
Mark Olesen
2009-12-11 17:31:15 +01:00
parent 73f9f7f780
commit 497ec32ed8
3 changed files with 19 additions and 1 deletions

View File

@ -67,9 +67,15 @@ int main(int argc, char *argv[])
while (is.good())
{
token tok(is);
// char ch;
// is.get(ch);
// is.putback(ch);
int lookahead = is.peek();
if (count == 0)
{
Info<< "token: " << tok.info() << endl;
Info<< "token: " << tok.info();
Info<< " lookahead: '" << char(lookahead) << "'" << endl;
}
}