You are here:

C/Adding mouse to simple C program

Advertisement


Question
Dear Sir
I am writing a small snake ladder game in plain old C. I would like to :

1- Add some interesting sound instead of pc speaker with sound(i)
2- Enable mouse to select no of players and click on buttons

I am a newbie in C, but very interested to go further with it.

Thanks for your time and help
Regards
Reeaz

Answer
Whatever you have asked is not part of C programming.
It is specific to compiler and also to platform you are working on.
The reason is, the sound card or mouse is a device and your operating system must be having a device driver for that.
If it doesn't have the driver, then it will not work.
And the compiler you are using must have some wrapper functions (exported interfaces) in C to access these devices.
So, your compiler should be having a related library and you will have to find that from your compiler documentation or you can join some user group of that compiler and start discussing there.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Narendra

Expertise

I can answer questions in C related to programming, data structures, pointers and file manipulation. I use Solaris for doing C code and if you have questions related to C programming on Solaris, I will be able to help better.

Experience

6.5

Organizations belong to
Sun Microsystems

Awards and Honors
Brain Bench Certified Expert C programmer.
Advanced System Software Certified

©2012 About.com, a part of The New York Times Company. All rights reserved.