? : notation for conditional set int a = expr ? true_value : false_value; So a would get the value of true_value if the expr is true and would get the value of false_value if the expr is false. Takes the place of: int a; if(expr) { a = true_value; } else { b = false_value; } but can also be used in prints and the like (as shown in stat.cpp example).