| | |
"Global hotkey" Need help :)
![]() |
•
•
Join Date: Aug 2008
Posts: 9
Reputation:
Solved Threads: 0
Hello all. I'm pretty new to C++ but not a total beginner. I have done a little program which basicly is a Timer. It's a clock that starts at zero and counts to 4min 45sec, then it playes a sound and restarts.
I want to add a feature which restarts the clock if the user presses the Enter key.
Here's the code (it's not very well organized but doesn't matter in such a small code):
I want to add a feature which restarts the clock if the user presses the Enter key.
Here's the code (it's not very well organized but doesn't matter in such a small code):
C++ Syntax (Toggle Plain Text)
#include <iostream> #include <windows.h> using namespace std; int main() { int kuk=1; int kuk2=1; int min; int sec; bool reset; while (kuk2 <= 2){ sec=0; min=0; reset=false; while (kuk <= 2){ PlaySound("alarm.wav",NULL,SND_ASYNC|SND_FILENAME); Sleep(1000); kuk++; } while (reset == false){ system("CLS"); cout << min << ":" << sec; sec++; Sleep(1000); if (sec >= 60){ min++; sec=00; } if (min == 4 && sec == 45){ reset=true; } } } return 0; }
![]() |
Similar Threads
- Removal of "Home Search Assistant", "Search Extender", & "Shopping Wizard" (Viruses, Spyware and other Nasties)
- Error loading "bridge.dll" (Viruses, Spyware and other Nasties)
- Please Analyze My HijackThis Logfile, I'm having "bridge.dll" problems at least. (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: What c++ book to get beyond beginner
- Next Thread: get registry value
| Thread Tools | Search this Thread |
api array based binary bitmap business c++ c/c++ char class classes code coding commentinghelp compile console conversion count decide delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez graph guess gui homeworkhelp homeworkhelper iamthwee ifpug ifstream incrementoperators infinite input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem proficiency program programming project python random read recursion reference rpg string strings temperature template templates test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets





