cout << "Hello World!";
This line is a C++ statement. A statement is a simple or compound expression that can actually produce
some effect. In fact, this statement performs the only action that generates a visible effect in our first
program.
cout represents the standard output stream in C++, and the meaning of the entire statement is to insert
a sequence of characters (in this case the Hello World sequence of characters) into the standard output
stream (which usually is the screen).
cout is declared in the iostream standard file within the std namespace, so that's why we needed to
include that specific file and to declare that we were going to use this specific namespace earlier in our
code.
Notice that the statement ends with a semicolon character (;). This character is used to mark the end of
the statement and in fact it must be included at the end of all expression statements in all C++ programs
(one of the most common syntax errors is indeed to forget to include some semicolon after a statement).
This line is a C++ statement. A statement is a simple or compound expression that can actually produce
some effect. In fact, this statement performs the only action that generates a visible effect in our first
program.
cout represents the standard output stream in C++, and the meaning of the entire statement is to insert
a sequence of characters (in this case the Hello World sequence of characters) into the standard output
stream (which usually is the screen).
cout is declared in the iostream standard file within the std namespace, so that's why we needed to
include that specific file and to declare that we were going to use this specific namespace earlier in our
code.
Notice that the statement ends with a semicolon character (;). This character is used to mark the end of
the statement and in fact it must be included at the end of all expression statements in all C++ programs
(one of the most common syntax errors is indeed to forget to include some semicolon after a statement).
Learn More :
Programming
- stddef.h Definitions for common types, NULL, and errno
- stdarg.h Definitions for accessing parameters in functions that accept a variable number of arguments
- stat.h Definitions used for file status functions
- signal.h Definitions for ANSI defined signaling capability
- setjmp.h Defines typedef and functions for setjmp/longjmp.
- MCOMMAND Programming in C
- MCINPUT Programming in C
- MCDISPLY Programming in C
- MCALC Turbo C Programming
- using namespace std; in C++
- int main() in C++ Language
- return 0; in C++
- Introduction in String in C++
- Constants in C++
- Calculate Cirrcumfrence Program in C++
- Structure of a program in C++ Learn
- alloc.h Memory Management Functions and Variables
- Defines structs, unions, macros, and functions for dealing with MSDOS and the Intel iAPX86 microprocessor family
- How do I create a configuration file?
- What is a configuration file? in C
- What is the difference between TC.EXE and TCC.EXE?
- How do I run Turbo C?
- How do I install Turbo C?