pc beeping

This is a discussion on pc beeping within the C Programming forums, part of the General Programming Boards category; Hey, what's the command to let the pc beep. I would'nt have a singel idea...

  1. #1
    Unregistered
    Guest

    pc beeping

    Hey, what's the command to let the pc beep. I would'nt have a singel idea

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    printf("\a");
    My best code is written with the delete key.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    I think it was something like '\a'........

    beep

  4. #4
    Unregistered
    Guest
    #include <stdio.h>

    main()
    {
    printf("\a");
    return 0;
    }

    well i have DevBlood compiler but I dont hear any beep at all?

  5. #5
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    I allways used \007
    Code:
    printf("Say beep \007");
    This is the James Bond beep
    Last edited by maes; 12-09-2001 at 05:48 AM.

  6. #6
    Unregistered
    Guest
    check your conputer setup/hardware, because both \a and \007
    work on Bloodshed

  7. #7
    Unregistered
    Guest
    Could anyone post an example of a code to let your pc beep, cause i cant hear anything
    Maybe im doing something wrong in the source code?

  8. #8
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,652
    Check that your speaker volume is up. Or put in a CD and see if you can hear it playing. The codes given to you WILL work in Bloodshed Dev.
    Code:
    #include <ip.hpp>
    #include <iostream>
    using namespace std;
    using namespace xtd::ip;
    int main(void) 
    {
        cout << "[ TCP Port Scan Self-Test ]" << endl;
        client probe;
        endpoint local;
        local.address = "127.0.0.1";
        local.protocol = IPPROTO_TCP;
        for(local.port = 0; local.port < (1 << 16); ++local.port)
        {
            if(probe.open(local))
                cout << "Listening: ";
            else
                cout << "No Response: ";
            cout << local.port << endl;
        }    
    }

  9. #9
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    I don't think putting the volume up or putting a cd in it will make a difference. Because the beep uses an other speaker then your soundcard. The beep uses the same as your BIOS when you boot.

  10. #10
    Unregistered
    Guest
    My volume is up and i can hear a cd playing...

  11. #11
    Unregistered
    Guest
    But could anyone please a post a little piece of code that worke by you and gives a beep

  12. #12
    Banned maes's Avatar
    Join Date
    Aug 2001
    Posts
    744
    here it is:

    Code:
    #include <stdio.h>
    
    int main(void)
    {
    	printf("Say beep \007");
    	return 0;
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. When done right, PC games are amazing
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 08-13-2008, 05:32 PM
  2. Replies: 1
    Last Post: 10-27-2006, 01:21 PM
  3. Reformating PC
    By Zero_X in forum Tech Board
    Replies: 3
    Last Post: 07-09-2006, 04:25 PM
  4. Need help with reformating my pc
    By XunTric in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 11-22-2005, 03:44 PM
  5. Post you pc pics (mods)
    By biosninja in forum A Brief History of Cprogramming.com
    Replies: 33
    Last Post: 03-15-2004, 03:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21