colors/sounds for a C program

Does anyone know how to add colors/sounds to your program?

Comments

  • : Does anyone know how to add colors/sounds to your program?
    :

    C has no native support for colors or sounds. You have to use some type of graphics or sound library, which ultimately ends up using the stuff Windows provides (so you can just go directly to Windows).

    If you want to stay in character mode/DOS mode (I am assuming you are using something like Visual C++), you can just use the Windows API console functions, which let you display characters or strings anywhere on the screen in one of sixteen foreground and background colors. The functions are a little cumbersome, but they don't require you to actually have a different structure to your program, as would be the case if you were using the full graphics services of Windows.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion