Solved

Sound-C++ newbie!

Posted on 1998-06-21
2
193 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
  • 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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.

777 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