Index: [thread] [date] [subject] [author]
  From: Jason Grosland <jcg3@cs.duke.edu>
  To  : 
  Date: Sat, 30 Jan 1999 20:30:13 -0500

Re: Trapping Control-D

On Tue, 26 Jan 1999, Luke Palmer wrote:

> as soon as they are pressed?  kinda like $INKEY for those of you who
                                           ^^^^^^
Whoa, that's really old-school...

The best bet for what you're thinking of doing is to use get(char) which
is available from streams.  That means, however that you'd have to process
every character, and do a lot of the work that streams already provide for
you (parsing spaces, splitting strings, converting to numbers, etc.).

char c;
cin.get(c);
if(c == '\t') {
  // do tab stuff...
}

Good luck,
-Jason

- jcg3@duke.edu         shanty.dorm.duke.edu         www.duke.edu/~jcg3 -




Index: [thread] [date] [subject] [author]