View Single Post
Old 08-26-2008, 03:57 PM   #1 (permalink)
smartydebater
 
Newb Techie

Join Date: Jan 2006

Posts: 39

smartydebater

Question C++ Programming Help

Hi. I'm trying to make a program that would make a beep noise (on a computers motherboard) every time a user presses a certain key such as "A" or "B" etc... So far I've come up with the code to make the beep noise, but I'm not sure how to gather the keystrokes. Any suggestions?

Code:
//C++ code -- motherboard beep
//compiled in dev-c++ version 4.9.9.2
#include <iostream>
#include <windows.h> // WinApi header

using namespace std;

int main()
{
Beep(523,500); // 523 hertz for 500 milliseconds

cin.get(); // wait
return 0; //no errors
}
Thanks,
David
smartydebater is offline