When the below function was run on linux64 bit machine in C++
i am getting the following problems.
void real_rec::dump(ostream& s, const int indent ) const
{
s << "real = ";
long f = cout.flags();
s.setf( ios::fixed );
s.precision( 2 );
s << value << "\n";
s.flags(f);
}
when i am using this function in my code i am getting this type of errors, when this function was ran on 16 bit machine I didnt had any problem
the corresponding errors are
common.cxx:1079: no matching function for call to `std::basic_ostream<char,
std::char_traits<char> >::flags(long int&)'
/usr/include/c++/3.2.3/bits/ios_base.h:333: candidates are: std::_Ios_Fmtflags
std::ios_base::flags() const
/usr/include/c++/3.2.3/bits/ios_base.h:337: std::_Ios_Fmtflags
std::ios_base::flags(std::_Ios_Fmtflags)
Please helpme to resolve this problem.