The problem is actually related to one of your class constructors:
base(int n);
This constructor is what is called a conversion constructor. It can be used to convert intto base, so it will be legal:
base x = 42;
If you do not want to allow this implicit conversion, you can do the constructor explicit:
explicit base(int n);
: " fout << coeff[i];?
, ( , "" ): - std::ostream operator<< , :
std::ostream& operator<<(std::ostream&, double);
- , :
std::ofstream& operator<<(std::ofstream&, const base&);
: std::ofstream std::ostream . , a double, .
std::ofstream. double to int, int base.
, , , , .
, , .
, , :
std::ostream& operator<<(std::ostream&, const base&);