This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: STL headers problem


I've been watching this thread and haven't seen it mentioned but I seem
to recall that there is another not-so-subtle difference between the
<header> and <header.h> syntax. Don't the namespace aspects of C++ come
into effect as a differentiating factor between the two? I thought that
using the <header> syntax brought the headers into the std namespace
whereas the <header.h> syntax brought them into the global space. This
would imply that <header> syntax is the new, preferred method but that
<header.h> would not necessarily be deprecated. Someone please confirm
this or set me straight!

	regards,

		Ben Scherrey

Gerald Pfeifer wrote:
> 
> On Wed, 22 Jul 1998, Jordi de Antonio wrote:
> > What's the difference between header files whit '.h' and without (p.e.
> > <vector.h> and <vector>). I've always used '.h' one's, but now I'm
> > having troube while porting the system to Visual C++ that doesn't have
> > '.h' versions. I would like to know the difference before start to do
> > changes.
> 
> The headers without .h (e.g. <vector>) are the standard ones, while
> those with .h (e.g., <vector.h>) are there mostly/only for backwards
> compatibility.
> 
> I'd recommend switching to the non-.h versions.


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