remove the "using namespace std;" line; it is not needed.
anyway it is confusing as then it is "unclear" if cout is yours or std::cout.

HTH