In addition, identifiers defined outside a function may not begin with an underscore.
Why does this restriction apply only to variables outside of a function? Not sure what purpose this could serve.
In addition, identifiers defined outside a function may not begin with an underscore.
Why does this restriction apply only to variables outside of a function? Not sure what purpose this could serve.
Related question: What are the rules about using an underscore in a C++ identifier?
Short answer: in order to avoid name collision with the standard libraries (e.g. STL, libc, etc.)