Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Help me, Obi C Kenobi...

Reply
Thread Tools

Help me, Obi C Kenobi...

 
 
red floyd
Guest
Posts: n/a
 
      01-29-2007
Old Wolf wrote:
> On Jan 29, 1:04 pm, red floyd <(E-Mail Removed)> wrote:
>> one of my pet peeves.
>>
>> Your include guard is invalid. The Standard states that any identifier
>> with a leading underscore followed by an uppercase letter is reserved to
>> the implementation.
>>
>> That means your compiler vendor (and the Standard Library vendor, if
>> they're not the same entity) can use an identifier such as _Hand_H_, but
>> *YOU* may not.
>>
>> Just use HAND_H_ as your include guard.

>
> Identifiers in uppercase starting with E are reserved for
> future use by errno.h. So this technique will not work
> for files starting with 'e'.
>
>

Good point. I don't have ISO/IEC 9899 around, so I forgot about that
part, which was included in 14882 by incorporation.

Maybe if for a a generic include guard:

#ifndef IG_FILENAME_H_ /* IG stands for "Include Guard" */
#define IG_FILENAME_H_

// source

#endif


 
Reply With Quote
 
 
 
 
Ed Dana
Guest
Posts: n/a
 
      01-30-2007
red floyd wrote:
> Old Wolf wrote:
>
>> Identifiers in uppercase starting with E are reserved for
>> future use by errno.h. So this technique will not work
>> for files starting with 'e'.
>>
>>

> Good point. I don't have ISO/IEC 9899 around, so I forgot about that
> part, which was included in 14882 by incorporation.
>
> Maybe if for a a generic include guard:
>
> #ifndef IG_FILENAME_H_ /* IG stands for "Include Guard" */
> #define IG_FILENAME_H_
>
> // source
>
> #endif
>
>


How about just DEF_FILENAME_H?

Just a thought.

Ed.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiling perl 5.16.2 on cygwin on win7 fails with minperl.exe errorand I don't know fix, help me obi one visphatesjava@gmail.com Perl Misc 4 02-25-2013 11:54 PM
Help Help Help Pentax S5i Help needed (Please) The Martian Digital Photography 14 06-20-2008 07:56 AM
HELP WANTED HELP WANTED HELP WANTED Harvey ASP .Net 0 07-16-2004 10:00 AM
Help me, Obi-Wan Kenobi Frogleg HTML 15 06-17-2004 12:32 AM
HELP! HELP! HELP! Opening Web Application Project Error =?Utf-8?B?dHJlbGxvdzQyMg==?= ASP .Net 0 02-20-2004 05:16 PM



Advertisments