📜  C C++ 中的“-->”运算符是什么? - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:49.570000             🧑  作者: Mango

代码示例1
--> is not an operator. It is in fact two separate operators, -- and >.

The conditional's code decrements x, while returning x's original (not decremented) value, and then compares the original value with 0 using the > operator.

To better understand, the statement could be written as follows:

while( (x--) > 0 )