<<< Notes regarding the Beep sample program | Index | The Assignment >>> |
Please note that the Beep call is not portable and is largely dependent on the OS that we are using.
The closest "beep" behavior that you can get in standard a C/C++ is to send the '\a' escape sequence to the standard output, that is, either
to the stdout stream,
printf( "\a" );
or to the std::cout object, for example,
std::cout << "\a";
The C++ standard inherits this from C standard:
"\a (alert) produces an audible or visible alert without changing the active cursor position."
On most common desktop systems, '\a' produces a beep from the system speaker, assuming the computer has one.
<<< Notes regarding the Beep sample program | Index | The Assignment >>> |