#include<iostream>
using namespace std;
template <class t, class t1>
class one
{
public:
t x,y;
one(t a,t b)
{
x=a;
y=b;
}
};
class two:public one
{
public:
template <class t>
two()
{
cout<<x<<y;
}
};
main()
{
one<int,int> a(10,20);
two<int,int> a
}
using namespace std;
template <class t, class t1>
class one
{
public:
t x,y;
one(t a,t b)
{
x=a;
y=b;
}
};
class two:public one
{
public:
template <class t>
two()
{
cout<<x<<y;
}
};
main()
{
one<int,int> a(10,20);
two<int,int> a
}
No comments:
Post a Comment