The implementation of Pair's toString() method
1 string Pair::toString() const 2 { 3 stringstream ss; 4 ss << x << " " << y; 5 return ss.str(); 6 }