#include #include using std::cout; using std::endl; using std::string; #include "Pair.h" int main(int argc, char **argv) { Pair ps; // this usage instantiates a class Pair string x("foo"), y("bar"); ps.set_first(x); // first_ = "foo", second_ = "" ps.set_second(y); // first_ = "foo", second_ = "bar" ps.Swap(); // first_ = "bar", second_ = "foo" cout << ps << endl; // nonmember overloaded operator<< invoked return EXIT_SUCCESS; }