C Beep Function Simple Question

This is a discussion on C Beep Function Simple Question within the C Programming forums, part of the General Programming Boards category; Hey! Just for fun, I've been experimenting with different ways to make sounds on computers. But I was wondering...with the ...

  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    47

    C Beep Function Simple Question

    Hey!

    Just for fun, I've been experimenting with different ways to make sounds on computers. But I was wondering...with the Beep() function in C with the windows.h library, is it harmful to your computer in any way? I read somewhere that it destroys the hardware...

    Thanks!
    ~Matt

  2. #2
    Registered User
    Join Date
    May 2006
    Posts
    20
    I dont know about a "beep()" function, but I know you can use "\a" in any printf() to achieve a beep. Its especially funny when a cat is sitting next to your laptop

  3. #3
    Registered User
    Join Date
    Jan 2002
    Location
    Vancouver
    Posts
    2,220
    MSDN doesn't list any problems with Beep
    http://msdn.microsoft.com/library/de.../base/beep.asp

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Well, I imagine this can't be good for your laptop's battery:
    Code:
    #include <stdio.h>
    
    int main(void) {
        for(;;) putchar('\a');
    }
    But I don't see how it could "destroy your hardware". (Maybe your eardrums, but probably not your hardware.)
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    IIRC, you used to be able to crash Windows XP with a series of backspaces and something or other else. It was pretty snazzy.


    Quzah.
    Hope is the first step on the road to disappointment.

  6. #6
    Registered User
    Join Date
    May 2006
    Posts
    20
    Quote Originally Posted by quzah
    IIRC, you used to be able to crash Windows XP with a series of backspaces and something or other else. It was pretty snazzy.


    Quzah.
    That would make for a funny headline, "XP Attacked by the Backspce Virus!!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Compiling sample DarkGDK Program
    By Phyxashun in forum Game Programming
    Replies: 6
    Last Post: 01-27-2009, 03:07 AM
  2. Function name basic question help
    By kenryuakuma in forum C++ Programming
    Replies: 7
    Last Post: 09-24-2008, 08:48 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 07:54 PM
  4. A simple question of a C++ function
    By meili100 in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2007, 07:49 PM
  5. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM

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