/*C++ program for unary logical NOT (!) operator overloading.*/
 
#include<iostream>
using namespace std;
 
class STUDENT
{
    private:
        int PassStatus;
         
    public:
	  string FirstName, FamilyName;
	  int Id;
        //function to get number
        void getNum(int x)
        {
            PassStatus = x;
        }
        //function to display number
        void dispNum(void)
        {
            cout << "value of PassStatus is: " << PassStatus;
        }
        //unary ! operator overloading
        void operator ! (void)
        {
            PassStatus = !PassStatus;
        }
};
int main()
{
    STUDENT Std;
    Std.getNum(1);
    cout << "Before calling Operator Overloading:";
    Std.dispNum();
    cout << endl;
     
    !Std;
    cout << "After  calling Operator Overloading:";
    Std.dispNum();
    cout << endl;
    return 0;   
}

