Subj : Input without Carriage Return (Enter) To : Jon Justvig From : Mercyful Fate Date : Wed Sep 16 2009 12:39 pm Re: Input without Carriage Return (Enter) By: Jon Justvig to All on Thu Aug 06 2009 15:22:01 > Hi all, I've been dealing with a problem for quite some time and was > wondering if someone could help me with this. I have written a program that > is currently under development and has not been released because it's far > from a public beta release. Anyway, I use std::cin to ask for input from a > menu of different option. My question is this. Dealing with portability to > compile both in Linux and DOS, I need to be able to just enter one character > from the keyboard to issue a command without hitting the enter key or a > carriage return. How would I code the input portion after a menu of > commands has been displayed on the console? That depends on what language you are using, if your Using C, or C++ Even, in Windows you can usualy include conio.h which has a getch(), myself i've always used the DevC++, and sorta riped out their conio.h and included it in my own project for windows development. In linux you can use Read() Write() with stdio, it works great.. test with Select(), then if there is data, use Read() to get it, sorta like sockets, but works perfect for console i/o. --- þ Synchronet þ Digital Distortion: digitaldistortionbbs.com .