public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* older setfs sintax to newer g++ 3.0.2
@ 2001-10-31 13:41 Giuseppe Zompatori
  0 siblings, 0 replies; only message in thread
From: Giuseppe Zompatori @ 2001-10-31 13:41 UTC (permalink / raw)
  To: gcc-help

Hi there,

I'd greatly appreciate any help with changing the following old code(ca. 1997)
to the new ISO standards.

<snip>
ostream &operator<<(ostream &io,const Cone &d)
{
 io.setf(ios::showpoint+ios::right+ios::fixed);
 io << "Cone " << d.height << " " << d.radius << " " << d.thetamin << "-" << 
d.thetamax << " " << d.zmin << "-" << d.zmax << "\n";
  return io;
} 
</snip>

gcc 3.0.2 fails with the following error:

g++-3.0.2 -c -W -ansi -O3 -mcpu=i586 -march=i586 -fomit-frame-pointer
-ffast-math -malign-double -fpack-struct -fno-exceptions -fno-rtti cone.cpp -o
cone.o -I. -Isurface_shaders -Idisplacement_shaders -Ilight_shaders
cone.cpp: In function `std::ostream& operator<<(std::ostream&, const Cone&)':
cone.cpp:50: no matching function for call to `std::basic_ostream<char, 
   std::char_traits<char> >::setf(int)'
/usr/include/g++-v3/bits/ios_base.h:323: candidates are: std::_Ios_Fmtflags 
   std::ios_base::setf(std::_Ios_Fmtflags)
/usr/include/g++-v3/bits/ios_base.h:331:                 std::_Ios_Fmtflags 
   std::ios_base::setf(std::_Ios_Fmtflags, std::_Ios_Fmtflags)
make: *** [cone.o] Error 1
What's the new sintax for setf?
I am not able to determinate it by myself as I am not even an hacker.
Again any help greatly appreciated.

Thanks in advance,

Giuseppe

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-10-31 13:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-31 13:41 older setfs sintax to newer g++ 3.0.2 Giuseppe Zompatori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).