compiler doesnt work

this is my file I have written.

// My first C++ program
#include <iostream>
int main()
{
std::cout << "Hi there!" << std::endl";
std::cout << "This is my first C++ program" << std::endl";
return(0);
}

This is the error I get, why?

$ g++ first.cpp
ksh: g++: not found [No such file or directory]

That means that either there is no C++ compiler installed, or that it isn't installed by the name of 'g++', which can be the case if it isn't the GNU C++ compiler.

Check with your system administrator which name it's installed as.