Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class lol
- {
- int a;
- public:
- lol() : a(0) {}
- };
- class xd
- {
- int a;
- public:
- xd() : a(0) {} // arba xd() { a = 0; }
- xd(int A) : a(A) {} // arba xd(int A) { a = A; }, bet tai neveiks jeigu a bus const.
- };
- int main()
- {
- lol wat; // wat.a = 0
- xd rofl; // rofl.a = 0
- xd omg(42); // omg.a = 42
- rofl = xd(52); // rofl.a = 52
- }
Advertisement
Add Comment
Please, Sign In to add comment