Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ukma!widener!news.cs.indiana.edu!ariel.unm.edu!nmsu!dante.nmsu.edu From: mdowell@dante.nmsu.edu (DOWELL) Newsgroups: comp.lang.c Subject: stdin and the keyboard Message-ID: <1619@opus.NMSU.Edu> Date: 26 Jun 91 21:35:13 GMT Sender: news@NMSU.Edu Distribution: usa Organization: New Mexico State University Lines: 22 Hello, I've got a quick question... I am trying to write a replacement for the DOS more command. I would like it to function as closely like the original as possible, therefore piping of commands is needed, ie dir | more. My problem is that when I get input from the command (dir) I set the file pointer equal to stdin, but when I go to check if a key is pressed getch() checks stdin and grabs a character from the command. I can't get it to recognize the keyboard and the input command separate instead of both being the stdin. I am running Borland C++ on a PC if that helps any. Any help would greatly reduce the frustration I am feeling!!! :-{ Mike Dowell mdowell@dante.nmsu.edu