Also, given that putting using namespace std; inside a header file is a big no-no (bad practice), you'd better qualify pair with std::