cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
Beeping in the background
Beeping in the background
Sep 13, 2009 at 4:17pm UTC
award982
(129)
Hey all!
I wanted to ask a weird question, i dont even know if its possible, sorry for my noobisheness
I wanted to ask is there a way to do a continuous beeping sound ( Beep(1000,100)
in the background, for example
cin >> number;
and while the user is writing the number it beeps in the background
so is it possible? and if so, how to do it?
Sep 13, 2009 at 6:18pm UTC
chrisname
(7395)
Try this:
1
2
3
do
{ std::cout <<
"\a"
; }
while
(cin >> number)
Sep 13, 2009 at 6:46pm UTC
award982
(129)
Nope, doesnt work, just beeps one time :(
Sep 13, 2009 at 7:34pm UTC
guestgulkan
(2942)
You could use threads.
Sep 13, 2009 at 7:35pm UTC
chrisname
(7395)
Threads would work.
Sep 14, 2009 at 2:24am UTC
Duthomhas
(13206)
It is easily possible without threads, but it is a little involved and OS-specific.
Do you absolutely
have
to do this?
Or can you live with something simpler -- such as a beeping sound until the user starts to enter an answer?
Sep 14, 2009 at 5:36pm UTC
award982
(129)
I really need to learn how to do this
Topic archived. No new replies allowed.