#include
#include
class
test
{
int a;
public:
test(int x)
{
a=x;
}
test(test &t)
{
a=t.a;
}
void display()
{
}
};
main()
{
test t1(25);
test t2(t1);
cout<<"Contents of
t1"<
t1.display();
cout<<"Contents of
t2"<
t2.display();
getch();
}
No comments:
Post a Comment