help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undefined references to variable problem


From: Thomas Maeder
Subject: Re: Undefined references to variable problem
Date: Fri, 30 Sep 2005 18:42:16 +0200
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

Simon Buchan <simon@hand-multimedia.co.nz> writes:

> More accurately, names begining with /two/ underscores, or an
> underscore followed by a capital are reserved for the vendor by the
> standard,

Even more accurately, names beginning with _[A-Z] or *containing* __
are reserved.

> ie:
> __special_vendor_name,
> _Special_vendor_name2.
> Just an underscore is generally fine, especially uglifing variables
> for class initialisation:

No. These names are also reserved, but just in the global
namespace. Which is enough for me not to declare them in user code
either ...


>       class X {
>               int y;
>       public:
>               X(int _y) : y(_y) {}
>       };

... even if this is ok, since this name does not belong to the global
namespace.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]