cast_stream not declared error

Ferng, Andrew D andrew.d.ferng@boeing.com
Fri Oct 27 00:49:00 GMT 2006


Hi Eljay,

Thanks for the reply.  I was just about to send out a never mind.

I did have it defined, except it was below where it was used.
I simply moved it above and it worked.

But not before going on a wild goose chase thinking my gcc install was
bad.

I'm surprised VS2005/xlC didn't complain about it.



-----Original Message-----
From: John (Eljay) Love-Jensen [mailto:eljay@adobe.com] 
Sent: Thursday, October 26, 2006 4:31 PM
To: Ferng, Andrew D; gcc-help@gcc.gnu.org
Subject: RE: cast_stream not declared error

Hi Andrew,

Have you defined cast_stream anywhere?

#include <sstream>
template <class out_t, class in_t>
out_t cast_stream(in_t const& in)
{
  std::stringstream s;
  s << in;
  out_t result;
  s >> result;
  return result;
}

HTH,
--Eljay



More information about the Gcc-help mailing list