This is because cout and endl are located in the std namespace. Don't worry about this right now, just put "using namespace std;" without quotes before int main().

Next time you post though you may want to give us the errors the compiler is reporting. It makes us easier to know what is the problem.