• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details

Why DOS programs in C/C++?

Status
Not open for further replies.

zegulas

Traceur
Can we write programs in C and C++ which run like VB programs, I mean like with a proper GUI. Because in our syllabus all we are taught are programs which run in DOS, but I have heard that Linux was made using C programming language then how did they built the GUI?
 

dheeraj_kumar

Legen-wait for it-dary!
A lot to learn, you have, my friend. The language is the same everywhere, but the libraries you use with it differ, and the compilers you use also differ.

You used Borland Turbo C++ with Borland's DOS libraries, hence you can only make DOS programs.

Windows GUI needs Windows libraries, which are supported by Windows compilers. You need to learn Windows API which is provided in the libraries, and use C/C++ to call the API to build the GUI.

Linux was written using C, and it was primarily a text based OS, however, graphics libraries were written, like Qt and GTK+ and they are used for building the GUI.
 

Liverpool_fan

Sami Hyypiä, LFC legend
Well it is not exactly DOS based(/me thinking of other compilers) but rather text based would be correct description.
Why text based? Because you have to at this stage of learning, learn the syntax, semantics, and analytical treatment in the programs. For basic input, output from text is the simplest and does not require background knowledge. After we'll gain some knowledge, we can move to GUI programming...:)
 
Last edited:
OP
zegulas

zegulas

Traceur
OK, got it, thanks a lot dheeraj_kumar & Liverpool_fan you guys have given me a new challenge to complete now, thanks a lot again. :)
 

aura

Sync dreams to reality
You can learn MFC programming ( it is a part of Visual C++ ). In this you can create VB like button,menus etc using Standard C++ code.
Here you have finer degree of control over every element and you can also define and create custom buttons,menus etc..

But, remember MFC is not as easy as VB. Apart from good command over the C++ language you must also know how to use the MFC Classes,Libraries.
 

dheeraj_kumar

Legen-wait for it-dary!
Dont ever learn MFC. I program only with API. I hate programming with MFC, because of its stupid naming convention, and all the confusing code the appwizard generates.
 
Status
Not open for further replies.
Top Bottom