void tst() { { char x; _x = 0; } // ... error C202: '_x': undefined identifier { char _x; x = 0; } // No errors! Are "_x" and "x" the same here? }
Drew Davis wrote: Identifiers that begin with an underscore are reserved for the language or implementation and shouldn't be used... This is correct
Actually, it's not. Identifiers with a leading underscore are reserved only if either
a) the second character is also an underscore, b) the second character is upper-case, or c) the name is at file-scope.
Neither of the above applies to the case at hand, a block-scoped variable with a lower-case second character.