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: Simon Buchan
Subject: Re: Undefined references to variable problem
Date: Mon, 03 Oct 2005 13:56:53 +1300
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Thomas Maeder wrote:
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.

OK, thanks for the corrections. (Where did you find the "containing '__'" restriction? The standard?)





reply via email to

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