Index: [thread] [date] [subject] [author]
  From: Luke Palmer <lop@duke.edu>
  To  : 
  Date: Tue, 26 Jan 1999 00:33:23 -0500

Re: Trapping Control-D

Ctrl-D is the EOF (end of file) character for ASCII, and will cause cin to
fail.  for example, in

while (cin >> anystringvariable)
{
    //do something
}

the loop will exit when the user enters a Ctrl-D.

i have another question for everyone- how can we read individual key strokes
as soon as they are pressed?  kinda like $INKEY for those of you who
remember QBASIC.  you would need this to do the tab thing in the extra
credit.  i probably won't get that far, it would just be a nice thing to
know.

if anyone has some conceptual ideas about how to implement an easily
maintainable operator precedence system that would be appropriate to share
with everyone, i would love to hear them.  i have been thinking about it for
a few hours and already have scrapped a few bad starts.  let me know-  good
luck.
--luke




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