Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Hold {
- private:
- int sum = 0;
- public:
- friend Hold& operator<<(Hold& hold, int add) {
- hold.sum += add;
- return hold;
- }
- int get() const { return sum; }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement