Thread: Beeping speaker in Win console mode

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    2

    Arrow Beeping speaker in Win console mode

    How do I do it? I thought I saw a "sound()" someplace, but I'm not sure what header it's in or how to use it.

    Andrew

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    There is a beep function in stdlib, but I have never used it before, and I don't even know what it does. I would give it a try, though.

  3. #3
    Code:
    printf("\a");
    Will give you a system beep, I think it ultimately depends on your compiler. Worked for me when I tried it on Dev-C++
    DrakkenKorin

    Get off my Intarweb!!!!

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    There is a Windows fuction called Beep(). Since you are probably not using Windows NT, you can set it's two parameters to zero.

    Thing is, it only gives you the default system beep, no way to pick the sound...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 10-22-2008, 07:20 PM
  2. console mode and service mode
    By George2 in forum C# Programming
    Replies: 0
    Last Post: 06-01-2008, 01:42 AM
  3. How to make console Mode apps like 'GNU less'?
    By gibsosmat in forum C Programming
    Replies: 4
    Last Post: 10-31-2007, 07:33 AM
  4. help with this
    By tyrantil in forum C Programming
    Replies: 18
    Last Post: 01-30-2005, 04:53 PM
  5. Console Functions Help
    By Artist_of_dream in forum C++ Programming
    Replies: 9
    Last Post: 12-04-2004, 03:44 AM