Re: Why is everthing prefixed with "_"
From: Bo Persson (bop_at_gmb.dk)
Date: 04/19/04
- Next message: William DePalo [MVP VC++]: "Re: Obtain PID's"
- Previous message: Simon Trew: "Re: Is it possible to assign a default value...great, but how?"
- In reply to: Igor Tandetnik: "Re: Why is everthing prefixed with "_""
- Next in thread: Phil Frisbie, Jr.: "Re: Why is everthing prefixed with "_""
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 19 Apr 2004 18:01:24 +0200
"Igor Tandetnik" <itandetnik@mvps.org> skrev i meddelandet
news:O76RnbhJEHA.268@TK2MSFTNGP11.phx.gbl...
> "Heinz Ozwirk" <wansor42@gmx.de> wrote in message
> news:c5qoin$8pr$02$1@news.t-online.com
> > That's one reason. Another one might be that (in C++) identifiers
> > beginning with an underscore are reserved for the implementation. So
> > these names will (should) never conflict with identifiers used in a
> > program.
>
> Not exactly. Identifiers beginning with an underscore followed by a
> capital letter, or beginning with two underscores, are reserved for
> implementation.
You missed the second sentence if the rule:
"Each name that begins with an underscore is reserved to the
implementation for use as a name in the global namespace."
> In particular, _itoa is not reserved.
Is too! :-)
In particular, when it is used as a global function, it IS reserved for
the compiler/library vendor. That's why MS uses this kind of name for
its extensions.
It is NOT reserved for use in a user defined class or namespace. Not
recommended though, as it will be very confusing.
Bo Persson
- Next message: William DePalo [MVP VC++]: "Re: Obtain PID's"
- Previous message: Simon Trew: "Re: Is it possible to assign a default value...great, but how?"
- In reply to: Igor Tandetnik: "Re: Why is everthing prefixed with "_""
- Next in thread: Phil Frisbie, Jr.: "Re: Why is everthing prefixed with "_""
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|