+ 2
What is the "-->" operator in c++?
I don't get it so i ask .
2 ответов
+ 1
Hello Prince.
'--> is not an operator. It is instead the combination of two operators which are '--' (decrement) and '>' (greater than). Consider the following example :
int a = 5;
int b = 6;
printf(b-->a ? "true" : "false"); // true
Because 'b--' is 5 but it doesn’t change the main value of b. So 6 is compared with 5. And as 6 is greater than 5 it returns true.
+ 1
Thanks