Topic: underscore-prepended variable names (http://www.newscene.com/)
Author: "Al Stevens" <alstevens@midifitz.com>
Date: 1999/11/24 Raw View
>If this code appears in system header files, it's dangerous because
>users can define macros with this name:
>
>#define STD_CSTDIO_H
>#include <cstdio>
As they can any other symbol the implementation chooses, rule or no rule (as
things are now).
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Al Stevens" <alstevens@midifitz.com>
Date: 1999/11/25 Raw View
Stan Brown wrote in message ...
>Nine do in C, and nine do in C++. (Eight of the nine are the same.)
Why, yes they do. CRS strikes again. Of course they have those names because
of the existing rule. Under a different (better) rule that was not bound to
tradition and legacies, they would have other names. Some of them might not
be macros.
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: "Al Stevens" <alstevens@midifitz.com>
Date: 1999/11/15 Raw View
>This is illegal, you're not allowed to #define cout before including
>any standard header (ANY, not only iostream).
Are you referring to a specific rule in the standard that makes that
particular #define illegal, or just saying that it's really not a good idea?
[ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
[ about comp.lang.c++.moderated. First time posters: do this! ]
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]