I’m really new to C++, and I’m seeing notations where the “?” symbol is being used as what seems to be a conditional. For example:
int conditionalMultiplication (int a) {
return a%2 ? 9a : 8a
}
I am wondering what this does and how it can be used properly. In addition, I am wondering what a single colon means/represents.
Help would be greatly appreciated!