pair.h 515 B

12345678910111213141516171819202122232425262728293031
  1. /*pair.h
  2. *
  3. *Dylan Jeffers
  4. *Tahmid Rahman
  5. *
  6. *This definition of a pair was
  7. *taken from Joshua Brody's CS31
  8. *class during fall of 2014 at
  9. *Swarthmore
  10. */
  11. #ifndef PAIR_H_
  12. #define PAIR_H_
  13. /**
  14. * A Pair is an container class for two pieces of data, which it
  15. * stores publicly.
  16. */
  17. template <typename F, typename S>
  18. class Pair {
  19. public:
  20. F first; // The first item in the pair.
  21. S second; // The second item in the pair.
  22. Pair() {};
  23. Pair(F f, S s) {first = f; second = s;};
  24. };
  25. #endif