DEV Community

Umid2008
Umid2008

Posted on • Updated on

Syntax(C++)

I would have left asking you to take a look at the code below before to realize its syntax.

include

using namespace std;

int main ().
{
cout < < < " Hello World;

return 0;
}
Now let's analyze a line of code.

scope: #include from this the library (#include) - calling is implemented. "iostream" means input and output stream - allows you to work with input and output objects, cout (see 5 lines in the code).
row: using namespace std means that we can use names for objects and variables from a standard library.
If you don't understand how #include and how it works, don't worry using namespace std. Just think of it as something that always appears in your app.

row: empty row abandoned. C++ ignores space.
row: always in C++ program

Top comments (0)