c++ if else in one line code example
Example: one line if statement c++
x = condition ? expression1 : expression2
// Example:
double x = (1 > 0) ? 10 : 20; // put any value
x = condition ? expression1 : expression2
// Example:
double x = (1 > 0) ? 10 : 20; // put any value