#include<iostream.h>
#include<conio.h>
class second; // forward declaration
class first
{
private :
int a;
public:
inline void getdata();
friend int high (first obj1 , second obj2);
};
inline void first :: getdata ()
{
cout<<"Enter the value of a : ";
cin>>a;
}
class second
{
private :
int b;
public :
inline void getdata();
friend int high (first obj1, second obj2);
};
inline void second :: getdata()
{
cout<<"Enter the value of b : ";
cin>>b;
}
int high (first obj1, second obj2)
{
if (obj1.a > obj2.b)
cout<<endl<<"The highest entered numbers is :"<<obj1.a;
else
cout<<endl<<"The highest entered numbers is:"<<obj2.b;
return 0;
}
int main()
{
first one;
second two;
clrscr();
one.getdata();
two.getdata();
high(one, two);
getch();
return 0;
}