Re: order of includes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Forcing users to #include in a specific order makes your code less
usable.  Try investigating what exactly is causing the error.  Since
iostream is a standard header file that shouldn't be depending upon
anything in your header file, there's probably a name clash somewhere.

Noel
On 1/8/06, Brian Budge <brian.budge@xxxxxxxxx> wrote:
> It turned out to be that I needed to change
>
> #include <iostream>
> #include <subdiv_shellmap.h>
>
> to
>
> #include <subdiv_shellmap.h>
> #include <iostream>
>
> Thanks,
>   Brian
>
> On 07 Jan 2006 21:55:48 -0800, Ian Lance Taylor <ian@xxxxxxxx> wrote:
> > Brian Budge <brian.budge@xxxxxxxxx> writes:
> >
> > > I am getting the following error:
> > >
> > > error: expected `,' or `...' before numeric constant
> > >
> > > The code is trivial, and has been successfully used before.  It is
> > > from a template library I wrote.
> > >
> > > From searching google, I get the impression that it could be from
> > > #including things in the "wrong" order.  Could this be the case?
> >
> > It's very unlikely.
> >
> > > Anybody have any tips or tricks for narrowing down the problem here?
> >
> > Look closely at the source code.  If that doesn't help, run the
> > compile with --save-temps, and look at the relevant line in the .i (if
> > C) or .ii (if C++) file.
> >
> > (Please don't reply to me personally; thanks.)
> >
> > Ian
> >
>
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux