1 2 3 4 5 6 7 8 9 10 11 12 | #include "stdio.h" char* getString () { return "String"; } int getInt () { return 5; } void main () { printf ("%s %d", 1 ? getString () : getInt (), 0 ? getString () : getInt () ); } |
I2luY2x1ZGUgInN0ZGlvLmgiCmNoYXIqIGdldFN0cmluZyAoKSB7CglyZXR1cm4gIlN0cmluZyI7Cn0KCmludCBnZXRJbnQgKCkgewoJcmV0dXJuIDU7Cn0KCnZvaWQgbWFpbiAoKSB7CglwcmludGYgKCIlcyAlZCIsIDEgPyBnZXRTdHJpbmcgKCkgOiBnZXRJbnQgKCksIDAgPyBnZXRTdHJpbmcgKCkgOiBnZXRJbnQgKCkgKTsKfQ==
prog.cs(2,0): error CS1024: Wrong preprocessor directive prog.cs(2,7): error CS0116: A namespace can only contain types and namespace declarations prog.cs(6,5): error CS0116: A namespace can only contain types and namespace declarations prog.cs(10,6): error CS0116: A namespace can only contain types and namespace declarations Compilation failed: 4 error(s), 0 warnings
-
result: Compilation error (maybe you wish to see an example for C#)


