Me and my friend is going to make an examination project in programming 1 (c++). So we decided to make a program that makes different sounds (beep) depending on which button on the keybord you press. You could say that it's kind of like a piano. We will make with the beep-function and different if- and else- or switch-cases. We're wondering if you have any tips on how to make the beep last as long as you have the button pressed down? Or do you have any other tips in general that make the program better (less bad)?
Thanks for fast answers!