Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Point {
- private:
- int x, y;
- public:
- Point(int _x = 0, int _y = 0) {
- x = _x;
- y = _y;
- }
- Point(const Point &tmp) {
- x = tmp.x;
- y = tmp.y;
- }
- int get_x() const { // this means we cannot change any variable in the function
- return x;
- }
- };
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement