Sunday, July 12, 2009

C programming language help?

is it possible in c:-


1) to play audio music by the help of a function? if not i want to embed music in my game how shall i do that ( not the c sound function real music ..)





2) how to open a software by the help of c that is if i want to make a program with a help option and when its clicked on it opens internet explorer! (how to call a program execution)





if the above 2) is possible then how to embed a address like if i hit H then the help comes into action and opens internet explorer and goes to the site mmysite?





3) how to insert graphics in c by graphics i mean pictures (like from mypictures folder)





4) i know how to make mouse appear in c but the problem is i cannot understand how is the mouse initialized (i have the code from net tried referring books but its really confusing none has the topic like initializing mouse in c) so any site which explain how to and the concept behind it (explain all the terms used) (sites like prog..heaven etc i know but a direct link?)

C programming language help?
You need to understand that C is a system level language. It doesn't provide an enormous platform itself that can do everything. If that's what you want, learn C# and use the .Net framework, or Java and its platform.





- play audio music by the help of a function? if not i want to embed music in my game how shall i do that –


You need to use an OS specific library that can handle audio. Take a look at Fmod or BASS. They are libraries that can handle common audio formats. Otherwise you'll have to work with the base audio libraries on the system (DirectSound, etc. ) and the decoders for the audio format (mp3 library, aac, whatever).





- how to open a software by the help of c that is if i want to make a program with a help option and when its clicked on it opens internet explorer! -


This is also OS specific. The Win32 API has functions that can execute other programs. Look at http://msdn2.microsoft.com/en-us/library... for example. That's just what the Windows API has. Other libraries may have this under different names. Under Unices, you'll want to look at the spawn functions.





- how to insert graphics in c by graphics i mean pictures (like from mypictures folder) –


Inserting graphics, you'll want to find a convenient library that handles all the different image formats. Some of them are higher level libraries that display them directly or whatever. In any case, you'll have to look around.





And I have no idea what you mean by making a mouse appear.
Reply:the problem with you is you don't know what does a library mean. you can do whatever you want with C, but you have to find libraries that have functions to do that for you or build your own library up on another library.


for GUI for example there is win32


No comments:

Post a Comment