[lug] gcc header files

D. Stimits stimits at idcomm.com
Mon Mar 13 18:16:25 MST 2000


jstarkey at polaris.umuc.edu wrote:
> 
> I'm reading these backwards, still haven't gotten your original
> mistakes:}
> 
> I'm #include'ing <iostream> and <iomanip>
> 
> I'm going by the book (although I did think it said fixed and
> showpoint were <iomanip>)
> 
> Thanks,
> 
> John

I don't know if, after receiving all my "additions and corrections",
you got this to work. But a common thing for books to do is assume a
"using namespace" line, and not explicitly using std:: or ostream::.
In the case of manipulators, this is almost always the problem...not
naming the right namespace, even if the include files are correct. Let
me know if use of std:: or ostream:: doesn't work...maybe send me the
file that is missing it.

Good luck!

> 
> >>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
> 
> On 3/12/00, 11:16:38 PM, "D. Stimits" <stimits at idcomm.com> wrote
> regarding Re: [lug] gcc header files:
> 
> > jstarkey at polaris.umuc.edu wrote:
> 
> > It's been a long night...I forgot to mention yet one more thing. The
> > manipulator for fixed and showpoint are included if you #include
> > <iostream>, but the std::setprecision() uses #include <iomanip>
> 
> > >
> > > Hello everyone.
> > >
> > > I'm trying to compile a simple program for school which uses the
> > > "fixed" and "showpoint" function calls. I can't get g++ to compile
> > > with them in there. I'm using RH6.1 and gcc 2.91.66.
> > >
> > > Anyone know why these won't go thru???
> > >
> > > I'm pulling from stream inputtxt so:
> > >
> > > inputtxt << fixed << showpoint << setprecision(2)
> > >
> > > setprecision is fine and there are no "can't find <iomanip>" errors. I
> > > can't find iomanip in /usr/include
> > >
> > > Basically it's calling fixed and showpoint undeclared identifiers.
> > >
> > > I tried asking this on the gcc list but noone is around.
> > >
> > > Can anyone in town help??
> > >
> > > Thanks,
> > >
> > > John
> > >
> > > _______________________________________________
> > > Web Page:  http://lug.boulder.co.us
> > > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug





More information about the LUG mailing list