Half hand operator program's working

Words
76
Reading
1 min
9y
Listen to this post
~1 min

hey steemit and steemians.

Lets start the working and proof of the morning's program the half hand operator.

Program Body:

#include <iostream>

#include <string>

using namespace std;

class damon{

int a;

public:

    damon(){

    a=0;

    }

    damon(int b){

    a=b;

    }

    void operator-=(int wolf){

    a=a-wolf;

    }

    void depict(){

    cout<<a<<endl;

    }

};

int main (){

damon vamp(80);

vamp-=10;

vamp.depict();

return 0;

}

Program's executation :

this is code in bode blocks.

executation.

some change and executation.

Thank you guys