colours and beeps in c :)

Started by
4 comments, last by Elite19 20 years, 8 months ago
Hi, I have been programming with c for about 3 days now, i have did all the tutorials i have found on the net, basicaly starting with hello world, data types,arrays pointers and the rest. It all makes sense to me, although i''m still a little shaky with pointers, but from what i''ve seen its all just about text and numbers. Does c have colours like changing the background colour or text, and make beeps with different pitches like in turbo pascal? I cant seem to find anything on graphics with c, or is that all for directx to deal with?
--------------------------------------------------------------------- There are 10 types of people in this world, those that understand binary and those who don't.
Advertisement
You''ll have to use an API like DirectX or the Windows API. But if you''ve only been programming in C for 3 days you should stick with text. Also, make your understanding of pointers as solid as possible because you will need it later.

Why you shouldn''t use iostream.h - ever! | A Good free online C++ book
So c doesnt even have the basics like coloured text? What about c++? Its not like i''m trying to make a 3d game atm, i''m just curious to see how it all fits together
--------------------------------------------------------------------- There are 10 types of people in this world, those that understand binary and those who don't.
Im not sure if this is a C++ function only, but you can always give it a shot:

BOOL Beep(
DWORD dwFreq, // sound frequency, in hertz
DWORD dwDuration // sound duration, in milliseconds
);
That''s from the Windows API.

Why you shouldn''t use iostream.h - ever! | A Good free online C++ book
Console Functions

If you want a beep just use '\a' in one of your text-printing functions:
"Hello World\a" <-- causes a beep.

__Would__you__please__thank__me__?


.lick


[edited by - Pipo DeClown on July 27, 2003 6:49:35 AM]

This topic is closed to new replies.

Advertisement