Probably the easiest and simplest in all respects way of how to start C++ programming is by making C++ console Hello World program. It doesn’t have windows and to some people that may look unnatural at first glance. A program under Windows without a window looks strange. But this is not true.
C++ Hello World program example – loading
First of all, Windows Operating system was born under MS DOS, Microsoft Disk Operating System. And in reality DOS is actually the basis for Windows system up to now. Console window is DOS interface, the one which existed from the very beginning of computer era. It was full screen then. All system administrators use console window to perform the most vital operations. Most Linux users have seen it. Probably most Windows users haven’t. And in fact console programs can do anything except GUI. They use original console interface which was at the beginning of almost all computer operating systems. And Linuxes also use the same console interface for the most important operations.
Anyway, C++ console Hello World program is truly the simplest possible one and in fact it’s the same in Windows and Linuxes. It’s very short and allows us to start programming in C++ computer language without getting involved in the long process of studying Windows GUI, Graphic User Interface. Using console programs we can work with Internet, process file and perform any tasks.
Here is the code of Hello World program for Windows:
using namespace std;
cout << “Hello World!\nPress any key to continue…”;
You can find amazing number of variations of console Hello World program… It depends on compiler, what libraries you want to use, how you will run the program and other reasons. And also, it must be noted, that sometimes one is lucky and gets it compiled and run in a click… in other cases another amazing amount of problems and quite tricky obstacles will arise suddenly out of nothing… So you should be prepared to fight those… bugs and dragons.
Programming consists very much of patience combined with passion. The more obstacles you overcome the more pleasure you get getting involved into the miraculous world of programming. And the console Hello World program example can be your first step into that world and the basis of your other useful programs.