Half hand operator program's working

in programming •  7 years ago 

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This post has received gratitude of 0.54 % from @appreciator thanks to: @learnandgrow.

thank you very much

The @OriginalWorks bot has determined this post by @learnandgrow to be original material and upvoted it!

ezgif.com-resize.gif

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message!

You got a 1.85% upvote from @postpromoter courtesy of @learnandgrow!