previous | start | next

Example - testPair.cpp

#include "Pair.h"

int main()
{
  Pair p1(2,3);
  Pair p2(5,5);

  Pair p3, p4;

  p3 = p1.add(p2);
  p4 = p1.add(1);

  cout << "Expecting p3 = (7,8)" << endl;
  cout << "p3 = " << p3.toString() << endl;

  cout << "Expecting p4 = (3,4)" << endl;
  cout << p4.toString() << endl;

  return 0;
}


previous | start | next