#include <stdlib.h>
#include <iostream>
#include <string>

using namespace std;

// A class that stores a pair of things of type T.
template <class T> class Pair {
 public:
  Pair() { }
  Pair(T a, T b) : first_(a), second_(b) { }

  void Print() { cout << "(" << first_ << "," << second_ << ")" << endl; }

  void Set(T a, T b) { first_ = a; second_ = b; }

  T first_, second_;
};

int main(int argc, char **argv) {
  Pair<string> stringpair("Hello", "world");
  Pair<string> *pairarr = new Pair<string>[2];

  pairarr[0].first_ = "ham";
  pairarr[0].second_ = "cheese";
  pairarr[1].Set("turtles", "facepaint");

  stringpair.Print();
  pairarr[1].Print();

  delete[] pairarr;
  return EXIT_SUCCESS;
}