?
Solved

Sound-C++ newbie!

Posted on 1998-06-21
2
Medium Priority
?
199 Views
Last Modified: 2010-04-10
Sure this is an easy one! But I can't seem to find it in my books. Anyway, I am trying to put in an audible beep if the user enters an invalid entry. Using Borland C++ compiler. How do i go about doing this?
0
Comment
Question by:nt2mch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 22

Accepted Solution

by:
nietod earned 40 total points
ID: 1166391
I assume this is for a windows program.  If so use the Beep() or MessageBeep() Windows API procedures.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1166392
If this is for a DOS program, you can write a BEL control character to the console, like

const char BEL = 7;
cout << BEL;
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question