What are the limits of console applications?

What are the limits of console applications?
What can I do with them?
What can't I do with them?
What should I learn next after learning the basics of programming C++ console applications?

A console application is an application that exclusively uses the console as a user interface. So, with a console application you can anything you can do with a non-console application, except those things that involve displaying graphics to the user.

I think the question you're not asking is "since console applications appear limited, how do I make a GUI?"
My answer is this: making usable GUIs is difficult and time-consuming. GUIs are meant, for the most part, to make programs easy to use, but if you're the only user your program is ever going to see, which is definitely true for any program you make while learning the language, then a GUI is only a distraction and a time sink.
The console is simplistic, but this just means that the information you can show to the user is simplistic. The program may still be very complex internally. Also, just because a program doesn't have a GUI doesn't mean that it can't produce graphical output; it simply can't display it to the user immediately. A program can still dump its output into an image file the user can later view. An easy but interesting example is a program that renders the Mandelbrot fractal to a bitmap file.
The console interface is limited to text input/output. You can't do graphics or sound with that interface. You have to use a library to provide a GUI or give access to graphics, sound, mouse and so on such as SDL or the win32 api.
Last edited on
@HandsomeJohn

It's not good form to cross-post!

What are the limits of console applications?
http://www.cplusplus.com/forum/windows/168917/
http://www.cplusplus.com/forum/general/168918/
http://www.cplusplus.com/forum/beginner/168916/

Andy
The console interface is limited to text input/output. You can't do graphics or sound with that interface
Nothing prevents you from manually creating a window from console application.
Nothing prevents you from manually creating a window from console application.

True. But then it's no longer a console app!

A console application is by definition an app which uses the console as its UI. So it's only limit is that it can only do character-based display (I was going to say text-based, but there are line drawing fonts.)

If you limit yourself to the C++ Standard IO Library it is very limited what you can do. But if you use, for example, the Windows Console API then you can position the cursor, colour text, etc. Similarly if you use the Curses library (which is for console apps, yes?)

Andy
Last edited on
Topic archived. No new replies allowed.