#include <iostream.h>
#include <conio.h>
class Minus
{
private:
int a, b, c;
public:
Minus( ) {} // Default Constructor
Minus(int A, int S, int C)
{
a = A;
b = S;
c = C;
}
void display(void);
//********Declaration of the operator function**********
void operator - ( );
}; // End of the Class Definition
//***********Member Function Definitions*************
inline void Minus:: display(void)
{
cout<<"\t a="<< a <<endl;
cout<<"\t b=" << b <<endl;
cout<<"\t c = "<< c<< endl;
}
//*********Definition of the operator function***********
inline void Minus :: operator - ()
{
a = -a;
b = -b;
c = -c;
//*************Main Function Definition**************
}
void main(void)
{
clrscr();
Minus M(5, 10, -15);
cout <<"\nBefore Activating the Operator - ( )\n";
M.display( );
-M;
cout<< "\nAfter Activating the Operator - ( )\n";
M.display( );
getch();
}