//here, operator function is friend function
#include <iostream>
using namespace std;
class Values
{
int a,b;
public:
Values(int av,int bv)
{
a=av;
b=bv;
}
friend int operator!(Values); //by friend function
#include <iostream>
using namespace std;
class Values
{
int a,b;
public:
Values(int av,int bv)
{
a=av;
b=bv;
}
friend int operator!(Values); //by friend function
};
int operator!(Values v)
{
int operator!(Values v)
{
No comments:
Post a Comment