In the previous post, you learned to create simple Hello World program in C++ by using Notepad or Dev-C++ editor. This tutorial teaches you the basic syntax of C++ programming language that you should know since you are new to this computer programming language.
It is a statement written down to include iostream header file that will allow us to use the command to receive input from users and display text on the screen.
- using namespace std;
The statement will import std namespace and allow us to use commands without having to type out their full names. A namespace defines names of variables or functions so that they do not conflict with other variables or functions that have the same names.
- C++ program will start from the main method:
This statement will tell the C++ compiler that your program ends here without any error. A value other than zero will be treated as abnormal termination by the operationg system.
-cout followed by <<
It is used to print text on the screen.
This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages: