#include using namespace std; template class Pair { public: Pair( const Type1 & f, const Type2 & s ) : first( f ), second( s ) { } template Pair( const Pair & rhs ) : first( rhs.first ), second( rhs.second ) { } void print( ostream & out = cout ) const { out << first << " " << second; } Type1 first; Type2 second; }; int main( ) { Pair p1( 3, 4.0 ); Pair p2 = p1; p2.print( ); return 0; }