怎么改这道C++的题目使T1和T2用不同的数据类型
#include<iostream>
#include<string>
using namespace std;
template<class T1,class T2>
class Pair
{
   public:
      Pair(T1 f,T2 s)
      {
          first=f;second=s;
      }
      void set(T1 f,T2 s)
      {
          first=f;second=s;
      }
      T1 getf()const
      {
          return first;
      }
      T2 gets()const
      {
          return second;
      }
    void swap()
     {
        T1 temp=first;
        first=second;
        second=temp;
     }
   private:
     T1 first;
     T2 second;
     
};                
int main()
{
    Pair<int,int> p(10,11);
    cout<<p.getf()<<" "<<p.gets()<<endl;
    p.set(9,12);
    cout<<p.getf()<<" "<<p.gets()<<endl;
    p.swap();                                     
    cout<<p.getf()<<" "<<p.gets()<<endl;
    system("pause");
    return 0;
}



											
	    

	


										
					
	