DIGIT-ARC read-only archive · snapshot: July 23, 2026

Why DOS programs in C/C++?

6 posts · originally from https://geek.digit.in/community/threads/why-dos-programs-in-c-c.110463/

zegulas
zegulas Original post #1
Mar 10, 2009 at 4:54 PM
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
Mar 12, 2009 at 6:25 PM
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
Mar 12, 2009 at 6:38 PM
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...:)
zegulas
zegulas #4
Mar 12, 2009 at 8:23 PM
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. :)
A
aura #5
Mar 13, 2009 at 12:07 PM
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
Mar 14, 2009 at 6:47 PM
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.