TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: All
from: Bill Patterson
date: 1995-09-22 09:20:16
subject: Cset ++

Sometimes the simplest things are the hardest. I'm converting some of my
code from "C" to "C++" using Cset ++. So far so good...
except for one little problem. I can't seem to find a way to accept JUST a
carriage return. cin.get() won't return just a CR as far as I can tell. Nor
will cin.read().
Here is a sample of what I want:

cout << "\n\n  Hit return when ready\n";
cin.ipfx(0);
cin.get(mychar);

The problem is; no cin routine I can find will return to my program so I
can test for a CR, EOF, error, or anything. There must be a way do this
with out resorting to back to stdio.h and C code.

Bill

--- LoraBBS-OS/2 v2.40+
* Origin: Planet X * Warp Co-Ordinates: 407-799-0975 (1:374/2528.0)
SEEN-BY: 105/42 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809
@PATH: 374/2528 1 3615/50 103/121 203 400 270/101 105/103 42 712/515 711/808
@PATH: 711/809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.