1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | int main() { } struct Vector { union { float elements[4]; struct { float x; float y; float z; float w; }; }; float length(); } ; float Vector::length() { return x; // error: 'x' was not declared in this scope } |
aW50IG1haW4oKSB7IH0KCnN0cnVjdCAgVmVjdG9yCnsKICAgIHVuaW9uCiAgICB7CiAgICAgICAgZmxvYXQgICBlbGVtZW50c1s0XTsKICAgICAgICBzdHJ1Y3QKICAgICAgICB7CiAgICAgICAgICAgIGZsb2F0ICAgeDsKICAgICAgICAgICAgZmxvYXQgICB5OwogICAgICAgICAgICBmbG9hdCAgIHo7CiAgICAgICAgICAgIGZsb2F0ICAgdzsKICAgICAgICB9OyAgICAgICAgICAgICAgICAgIAogICAgfTsKCiAgICBmbG9hdCAgIGxlbmd0aCgpOwp9IDsKCmZsb2F0IFZlY3Rvcjo6bGVuZ3RoKCkKewogIHJldHVybiB4OyAgLy8gZXJyb3I6ICd4JyB3YXMgbm90IGRlY2xhcmVkIGluIHRoaXMgc2NvcGUKfQ==
-
upload with new input
-
result: Success time: 0s memory: 2720 kB returned value: 0


