What compiler you are using which gives error on adding "using namespace std". If it gives error for "using namespace std" that does mean you need to include the file using the older method of .h