スレを勃てるまでもないC/C++の質問はここで 18
■ このスレッドは過去ログ倉庫に格納されています
0081デフォルトの名無しさん
2010/12/25(土) 23:12:33CとC++では若干異なるが原則としてアンダースコアで識別子を始めるのは良くない
ISO/IEC9899:1999
§7.1.3 Reserved identifiers
? All identifiers that begin with an underscore and either an uppercase letter or another
underscore are always reserved for any use.
ISO/IEC 14882:2003
§17.4.3.1.2
? Each name that contains a double underscore (_ _) or begins with an underscore followed by an uppercase
letter (2.11) is reserved to the implementation for any use.
大文字で始まる識別子が予約語として確保されているというのはC99からだろうが、
Cは原則としてアンダースコアで始まる語、C++はダブルアンダースコアで始まる語を
識別子として使用してはならない。
■ このスレッドは過去ログ倉庫に格納されています