What is allegro?
- I couldn't find the specific library you are talking about, Allegro. Can you provide a link to it? Anyways, I'll try to answer your questions about libraries in general.
How is it used in a c++ program?
- A library should provide you with the header files that you #include in your code and the dll files (or obj files) that you pass to the linker. To pass those files to the linker, you can use the various command-line switches that your linker accepts (details vary between compilers but the idea remains the same). Some development environments make this process more user friendly by providing a GUI to choose the libraries that your project links with.
Do we need to download it if its not present in the compiler?
- You will need to download it. Some libraries are standard (like some math libraries or Windows GUI libraries) but Allegro is something special so it won't be shipped with your development environment.
How do we use its various functions in a C++ program?
- You will need to read the documentation of the library to learn how to use it.
Are there other libraries like allegro which have various graphics and animation functions used to develop game?
- I'm certain that there are hundreds, but personally I never programmed anything like it so I won't go into this subject.
How can i add them into my compiler?
- I described the general steps, you need the #include files and the linker options.
Are these libraries already there in compiler like DEV C++??
- Probably not; special-purpose libraries need to be obtained from their creator.
Is it useful to use compilers other than borland's turbo c++?
- Turbo C++ is very outdated. It is a DOS program and your library might require Windows. Also, it is likely that the header files that you #include won't be understood by the old compiler. You should switch to DEV C++ which comes with the gcc compiler, which is considered by many to be one of the best compilers in the world.