#ifndef PAIR_H #define PAIR_H #include using namespace std; template class Pair { private: T key; U value; public: Pair(T k, U v = U()) : key(k), value(v) {} T getKey() const {return key;} U getValue() const {return value;} void setValue(U ); }; template void Pair::setValue(U v) { value = v; } template ostream& operator<< (ostream& out, const Pair & p) { out << "(" << p.getKey() << ", " << p.getValue() << ")" ; return out; } #endif