C/api

Advertisement


Question
QUESTION: I want 2 make use of GUI in my project work.
But I don't know how 2 add on graphical stuff using C programming alone.
The problem (to my knowladge) is graphics does not come under ANSI standard.
And DevC++ does have problem in supporting those too.

How api development could be carried out in windows and/or linux platforms?
And that to using C alone............
Which one would be better 2 pursue 4 graphics work C/C++ ??

Plz provide me enough reasons so that i get convinced.........
Please provide me the necessary links and tips so that I could develop APIs using C/C++.
I need the respective theory and examples for API development using C/C++.
plz provide separate descriptions with respect to C and C++..........

plz sir help me..................

ANSWER: Hello Purna.

I believe that in your part of the world, Turbo C/C++ is very popular, and I think it has ability to create GUI. I do not know anything about Turbo C, except that it is quite old and not up to the latest standard. If you are just starting to learn, I suggest learning newer technology. Of course, if you are learning in order to get a job, you should learn what is in demand in your country.

You are correct that GUI is not part of the C or C++ standard. You need a GUI library. One of the best I have seen is Qt. It has the following nice features:

* it is free
* it works on Windows and Linux
* it comes with its own development environment
* it comes with the minGW compiler which is based on gcc and which follows the latest language standard
* it comes with a debugger.
* it has very good documentation.

You can get it at
http://qt.nokia.com/products

You can get a good free book on it from  
http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip

You can get more information at
http://www.kdedevelopers.org/node/3526

I played with Qt for about a weekend, and I plan to learn more. What I have seen so far is great. Since everything is free, you have nothing to lose by trying it.

I don't work for nokia.

Best regards
Zlatko

---------- FOLLOW-UP ----------

QUESTION: How can an extra library or header file be added to a compiler/program??

Answer
Header files are added to your files with the include statement like this

#include <stdlib.h>

The compiler knows where to find the standard header files, but it needs to be told where to find the header files that you create or the header files of libraries which did not come with the compiler.

Libraries are linked in by the linker, which runs after the compiler.

I don't know anything about DevC++, but I suppose there is some properties dialog box where you can specify include file paths, libraries, and library paths.

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Zlatko

Expertise

No longer taking questions.

Experience

No longer taking questions.

Education/Credentials
No longer taking questions.

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