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() {
- cout << "empty constructor" << endl;
- // ova znaci deka koga ke pravime objekt od Point avtomatski x i y ke imaat vrednost od 5
- x = 5;
- y = 5;
- }
- };
- int main() {
- Point p;
- cout << p.x << " " << p.y << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement