Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- class myStruct {
- private:
- int x_;
- int y_;
- //const int x_;
- //const int y_;
- public:
- //myStruct(int x, int y);
- myStruct();
- myStruct(const myStruct &);
- int getx() const {
- return x_;
- }
- int gety() const {
- return y_;
- }
- int & changex(int x) {
- x_ = x;
- int & r = x_;
- return r;
- }
- int & changey(int y) {
- y_ = y;
- int & r = y_;
- return r;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement