BRIAN VICKERY wrote in news:LKuSb.110$:
> I've heard that some compilers reserve the '_' starting a symbol for
> system variables/symbols. I can not find this documented anywhere (so
> far). I've used an '_' at the end of member variables (ie. Uint16
> bar_; ) to distinquish private fields, but this does not stand out as
> much as if the '_' were at the begginning of the name as in the
> following class declaration.
>
> class Foo {
> private:
> Uint16 _baz;
> Uint32 _bar;
>
> public:
> ....
> };
>
Am identifier with single leading undersore is reserved for the
implementation if:
Its followed by an uppercase letter (anywhere).
Its followed by another underscore (anywhere), in fact *all* identifiers
that *contain* 2 or more *consecutive* underscores are reserved.
Its declared at global namespace scope, i.e its a macro or it
*isn't* declared within an namespace, class, struct or union or it
*isn't* a paramiter name or a local variable name.
Also IIUC it shouldn't be a declared extern "C".
So you usage for member identifiers is Ok.
Nobody really likes it though and most people can't be bothered to
remember all the rules, so they will probably complain that your using a
reserved identifier anyway, so I'd suggest m_baz or some such thing.
Rob.
--
http://www.victim-prime.dsl.pipex.com/