From: "MrShifty" Newsgroups: comp.os.msdos.djgpp Subject: simple getch() Lines: 23 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Message-ID: Date: Fri, 06 Sep 2002 19:16:44 GMT NNTP-Posting-Host: 65.34.64.147 X-Complaints-To: abuse AT rr DOT com X-Trace: twister.tampabay.rr.com 1031339804 65.34.64.147 (Fri, 06 Sep 2002 15:16:44 EDT) NNTP-Posting-Date: Fri, 06 Sep 2002 15:16:44 EDT Organization: RoadRunner - Tampa Bay To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com When I run this program it doesn't beep until I hit escape. At that point it beeps however many times that I hit the spacebar. I know it has to be somehting simple. Any help is appreciated. If this is the wrong newsgroup please point in the direction of a Windows specific newsgoup. Here is the code: #include #include int main(){ int ch; while(ch != 27){ ch = getch(); if(ch == 32) cout << '\a'; } return 0; }