![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0
![]() |
Beeping in DOS
I was just wondering if anyone knew how i could make a beeping come from the computer when the user presses a key(such as enter)?
For example, a quiz and when they finish it(and press enter), a beeping comes from the computer before DOS closes. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2005
Location: Woo - Boot Sector!
Posts: 294
Rep Power: 4
![]() |
std::cout << "\a"; ![]()
__________________
www.heldtogether.co.uk |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2005
Location: Belfast
Posts: 35
Rep Power: 0
![]() |
thanks
![]() |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
Join Date: Mar 2005
Location: United States
Posts: 124
Rep Power: 4
![]() |
Nice, this will be usefull to me as well
-BB98
__________________
Learning to use C++ and loving every minute of it. |
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
You gotta be kidding me, please don't use those annoying beeps in one of your programs, I'll delete your program, hack your website and call the cops to storm your house
.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
You can disable the beeps if they annoy you, you know. They're useful to provide audible feedback or to grab the user's attention in the absence of more advanced methods for doing so.
|
|
|
|
|
|
#7 |
|
Newbie
Join Date: Dec 2005
Posts: 3
Rep Power: 0
![]() |
..hi, i'm sorry for break into it...
...but will someone explain the parsing of that std::cout << anything ?? - just now a 'little' on c, so as i would try it would look like this #include <stdlib.h>
char *anything;
void main () {
wirte ( 1 , *anything , strlen (anything)) }...is that correct? |
|
|
|
|
|
#8 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
#include <stdio.h>
char * anything = "hi";
main()
{
printf("%s\n", anything);
}
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
|
|
#9 |
|
Newbie
Join Date: Dec 2005
Posts: 3
Rep Power: 0
![]() |
...thx @ xion...but nice try...wasn't it??*g..
...lol...& a happy new year!!! beside: pokemon:~$ echo '
int main () {
std::cout << "hello\n"; }
' > main.cc
pokemon:~$ gcc main.cc
main.cc: In function `int main()':
main.cc:3: error: `cout' undeclared in namespace `std' |
|
|
|
|
|
#10 |
|
Professional Programmer
Join Date: Jun 2005
Location: India, The great.
Posts: 435
Rep Power: 4
![]() |
You forgot to include iostream.
__________________
PFO - My daily dose of technology. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|