This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Re[2]: HELP!!!!


> From: Earnie Boyd <earnie_boyd@yahoo.com>
> 
> --- FallenAngel <666FallenAngel@gmx.net> wrote:
> > 
> > EB> Also, try removing the spaces within the angle brackets. I.E.
> > EB> write it as #include <stdio.h> instead of #include < stdio.h >.
> > 
> > thanks! that worked! -but why?
> > i'm using a c/c++ tutorial and there it's " < stdio.h >
> 
> I've never seen it with spaces.  Most of us are lazy and avoid unneeded
> characters.  I don't know what the ANSI specifications are to know if
> this is a bug or not.

All the characters between the angle brackets form the name of the
header, so <stdio.h> asks for a different header than < stdio.h >.
The mapping from this name to an actual file or built-in representation
is implementation defined, so an implementation is free to interpret
the second version by stripping leading and trailing spaces, and
end up with the same header as the first version, if it so chooses.
The names of the Standard headers do not include leading or trailing
spaces, so the correct form to use is <stdio.h>.

FallenAngel should get a better tutorial.

> I've copied the list on this for the benefit of archiving.

Ditto - this is off-topic, but I thought it worth an explanation to
complete the story. If anyone wants to discuss this further, please
do so in an appropriate forum or by private email.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]