Solved

Sound-C++ newbie!

Posted on 1998-06-21
2
195 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 10 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

763 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