// File: invent.cc
// Demo of template functions

#include <iostream>
#include <fstream>
using namespace std;

#include "part1.h"

template < class T >
void swap( T& x, T& y );
template < class T >
void output( ostream& out, T x, T y );
int main() {
    Part A(1011, 10, 22.55),
         B(2222, 22, 10.11);

    output( cout, A, B );

    swap( A, B );

    output( cout, A, B );
}

template < class T >
void swap( T& x, T& y ) {

   T temp;
   temp = x;
   x = y;
   y = temp;

}

template < class T >
void output( ostream& outfile, T x, T y ) {
   outfile << x << "  " << y << endl;
}
