相关疑难解决方法(0)

C++中的" - >"运算符是什么?

看完后隐藏功能和C++/STL的暗角comp.lang.c++.moderated,我完全惊讶的是,下面的代码片断编译并在两个Visual Studio 2008和G ++ 4.4的工作.

这是代码:

#include <stdio.h>
int main()
{
    int x = 10;
    while (x --> 0) // x goes to 0
    {
        printf("%d ", x);
    }
}
Run Code Online (Sandbox Code Playgroud)

我假设这是C,因为它也适用于GCC.标准中定义了哪里,它来自何处?

c++ code-formatting standards-compliance operators

8590
推荐指数
27
解决办法
75万
查看次数