1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include <cstdio> class A { public: int x; A(){ printf("default cons %p\n", this); } A(A& foo){ printf("copy cons %p\n", this); } }; A lol; A wow(void) { return lol; } int main () { A stick; stick = wow(); return 0; } |
I2luY2x1ZGUgPGNzdGRpbz4KCmNsYXNzIEEgewogIHB1YmxpYzoKICAgIGludCB4OwogICAgQSgpeyBwcmludGYoImRlZmF1bHQgY29ucyAlcFxuIiwgdGhpcyk7IH0KICAgIEEoQSYgZm9vKXsgcHJpbnRmKCJjb3B5IGNvbnMgJXBcbiIsIHRoaXMpOyB9Cn07CgpBIGxvbDsKCkEgd293KHZvaWQpIHsKICAgIHJldHVybiBsb2w7Cn0KCmludCBtYWluICgpIHsKCkEgc3RpY2s7CnN0aWNrID0gd293KCk7CgogIHJldHVybiAwOwoKfQ==
-
upload with new input
-
result: Success time: 0s memory: 2892 kB returned value: 0
default cons 0x804a020 default cons 0xbf939024 copy cons 0xbf939020


