C++标识符

Jam*_*ard 3 c++ identifier

C++ Primer说:

我们在程序中定义的标识符可能不包含2个连续的下划线,标识符也不能以下划线开头,后面紧跟一个大写字母.此外,在函数之外被罚款的标识符可能不以下划线开头

一切都很好,但是

int _c = 55;                  // outside function starts with _

int main () {

    int _A = 12;              // _ followed by uppercase letter
    cout << _A << endl;

    int __b__ =33;            // 2 consecutive __
    cout << __b__ << endl;

    cout << _c << endl;

}
Run Code Online (Sandbox Code Playgroud)

上面的代码g++ 4.7.1使用以下标志在mac 上编译完全正常

g++ -pedantic -Wall -Werror -std=c++11 -O3 -funroll-loops -fprefetch-loop-arrays
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

Bo *_*son 9

穿过街道而不是双向寻找交通并不能保证你被公共汽车碾过,但这仍然是一个坏主意.

有一天它不会起作用......