Hello, I'm still a huge beginner in C++ and while i spent hours trying to find a solution to this problem i came to this forum pretty often and I thought it'd be a good idea if I try to ask about my problem. (If you notice anything that can be done better I'd be more than happy to hear an criticism, advice, or lesson about coding). I just wanted to try a little project on my own outside of my C++ class and I wanted to make a timer for myself (since i always end up losing my sense of time on the computer haha), Everything was going fine until i found the urge to make a Snooze and shutdown available while my program continuously plays a beep (Sort of like an alarm clock). Obviously Im stuck at being able to input something while the beep is going on. I don't even know if its possible since If i do cin>> in the loop itll only beep once before it waits for input and if i dont itll just never stop looping. Line 40 and down is me trying to use getch() (I read up about inputting without the prompting of enter, so i was hoping it would somehow work) but it doesnt work the way I want it to.
Edit: i use dev-cpp btw :P (If theres a better program/compiler out there id also be glad to hear about that.)
Heat up 3 vst download. Heat Up 3 comes with over 860 instruments including a brand new expansion pack Studio Essentials. Heat Up 3 comes as a VST plugin for Windows and a VST and Audio Unit for Mac. Also included is a standalone app for both Windows and Mac so HeatUp 3 can be played without a DAW (Digital Audio Workstation).
Figure 0.1 – Dev-C circa 1999 I rushed home from work and installed this program, it was very basic and rather ugly, but I didn’t notice. I opened one of the samples, pressed compile and got greeted by a message that this program could not be compiled, then the.
Looks like your program got cut off, but I think the general gist is this. Programs like this are sequential. One thing happens at a time. You are either beeping, calculating, waiting for input, display, calculating, whatever. Two things can't happen at the same time in most programs.
If you want to be able to beep and accept input at the same time, you need a separate process and/or separate threads. That can get complex. I am not too familiar with the 'system' command. It's generally frowned on, but it may be a blunt instrument that can do the job in your case. I don't know.
But the right way would be to have a process/thread (there are pros and cons to each) that is spawned when the alarm goes off and which is run separately. When snooze is hit, you kill that beep process. Looks like you're in Windows. I know nothing about how to create threads/processes in Windows C++, and to be fair, not much more on ho to do it in Linux.
But I think that what you are trying to do cannot be done in one process containing one thread.