compare two value in oop based programing
#include<iostream>
using namespace std;
class com
{
private:
int a;
int b;
public:
int d()
{
cin>>a;
return 0;
}
int bd()
{
cin>>b;
return 0;
}
};
int main()
{
com c1;
if(c1.d()==c1.bd())
{
cout<<"y"<<endl;
}
else
{
cout<<"n"<<endl;
}
return 0;
}