Ad
  • Default User Avatar

    I wish there was more such a links with explanation. Thanks a lot!

  • Default User Avatar

    Yes, it's the conditional statement in C/C++: a ? b : c has the value b if a is true, and c if a is false. But it is possible that c is another statement of the same kind, so e.g. a ? b : x ? y : z has the value b if a is true, y if a is false but x is true, and z if a and x are both false. Similiarly, z could be yet another conditional statement, and so on. No parentheses are required, and the source code can be formatted as in this solution, so it looks like a list of conditions to be checked and corresponding values to take. Java and Javascript both allow this syntax too.

  • Custom User Avatar

    Automatic type choice. These are all valid:

    auto a = "sss";      <--  stores string
    auto b = 123;        <--  stores integer
    auto c = 123456789;  <--  stores long
    
  • Default User Avatar

    what does "auto" mean?

  • Default User Avatar

    Nice! Could you please share the description of "return". Am I right that expression before the sign "?" means a condition to check, semicolomn is a start of a second condition and remains third one wich returns just name of firstAttacker in the case of failing other?