You do not have to reference std::cout
or std::endl
explicitly.
They are both included in the namespace std
. using namespace std
instead of using scope resolution operator ::
every time makes is easier and cleaner.
#include<iostream>
#include<string>
using namespace std;