Okay here is our first C++ tutorial. What we will do here is to do a simple output to the screen
by using cout << Im sure you've seen this everywhere but we want to start here aswell. Take a
look at the code snippet below:


#include <iostream>

using namespace std;

int main()
{

cout << "Nevureal!";
getchar();
return 0;

}


Take a look at this line of code:


#include <iostream>


This is a so called "preprocessor directive" and is recognized by the '#' in front of it.
The preprocessor runs before the actual compiler does. In this case we are using an "include
directive" which tells the preprocessor to include another file. So why would you do that? Well
the answer is fairly simple. You include other files because they contain code that makes things
easier for us. You may notice that its surrounded by (<) & (>). This means that the compiler will
look for the file where it keeps all the other files that came with our compiler. You can also
surround them with (") which makes the compiler look for the file in the same folder you are
working in. This will be exmplained further on.


using namespace std;


The using directive will give us direct access to all the elements of the std namespace. This
makes it more simple for us to do output because we do not have to type std::cout << anymore, we
only need to make it cout << And there are more simplified things it does such as endl; cin >>
etc...

And here is another example. Point your eyes to << endl;


#include <iostream>

using namespace std;

int main()
{

cout << "Nevureal!" << endl;
getchar();
return 0;

}


<< endl; tells the compiler that its the "end of the line" simply. Which takes us to the line under. Another way to jump to the line below is to put a '\n' inside a output such as "Nevureal!\n" . If you combine them both as done below:


#include <iostream>

using namespace std;

int main()
{

cout << "Nevureal!\n";
cout << "New line" << endl;
getchar();
return 0;

}


You will jump over the line below and as you can see we ended that line aswell!
Next step will explain variables and how to use them.