Friday, December 10, 2010

/* WAP to this pointer */

#include
#include
class abc
{
int a,b;
public:
void get(int a,int b)
{
this->a=a;
this->b=b;
}
friend void put(abc &n);
};
void put(abc &n)
{
cout< }
void main()
{
abc q;
q.get(10,20);
put(q);
}

output-:
10
20

No comments:

Post a Comment