Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Point {
- public:
- int x;
- int y;
- Point() {
- // obicno empty constructor treba da izgleda tokmu vaka
- }
- Point(int _x, int _y) {
- x = _x;
- y = _y;
- }
- };
- int main() {
- Point p(5, 6);
- cout << p.x << " " << p.y << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement