| | |
"Global hotkey" Need help :)
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
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 beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





