www.delorie.com/archives/browse.cgi | search |
From: | "Shawn" <malicon AT frii DOT com> |
Subject: | Re: trouble with cin.get() |
Newsgroups: | comp.os.msdos.djgpp |
References: | <19990113174226 DOT 23168 DOT 00000068 AT ng-ce1 DOT aol DOT com> <77jsgj$9hk$1 AT holly DOT prod DOT itd DOT earthlink DOT net> |
Message-ID: | <01be4004$6397eb60$368611d8@shawnmain> |
X-Newsreader: | Microsoft Internet News 4.70.1155 |
Lines: | 21 |
Date: | Thu, 14 Jan 1999 21:08:25 GMT |
NNTP-Posting-Host: | 216.17.134.54 |
X-Complaints-To: | abuse AT frii DOT net |
X-Trace: | news.frii.net 916348105 216.17.134.54 (Thu, 14 Jan 1999 14:08:25 MST) |
NNTP-Posting-Date: | Thu, 14 Jan 1999 14:08:25 MST |
Organization: | Front Range Internet, Inc. (800-935-6527) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Vadim Pokotilov <vpoko AT earthlink DOT net> wrote in article <77jsgj$9hk$1 AT holly DOT prod DOT itd DOT earthlink DOT net>... > Actually, I had the same problem when I tried to make my SUD (single, as > opposed to multi, as in MUD). I ended up just making my own input routine > using a looped getch();. Worked much better. When the user typed in a space > it automatically incerented the index (it is defined as char* input[2]). Of > course, getting any kind of natural language parsing (A la Zork) is very, > very hard to do. It is?? I have never had any problem looking at it like a true mud does and the code isn't that hard to duplicate on a single user version. I wouldn't need to do what you suggested. I guess I would use a stack and parse the sentence form a raw string, not worrying about reading each char independently, since you need to worry about all the arguments of the entire statement at once.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |