I'm learning C++ and am using a simple IDE to enter code.
My code is as follows.
#include <iostream>
#include <fstream>
#include <cstdlib>
void file_it(ostream &os, double fo, const double fe[],int n);
using namespace std;
int main()
{ //...simple code...// }
void file_it(ostream & os, double fo, const double fe[], int n)
{
ios_base::fmtflags initial; // <<<< compile error here
initial = os.setf(ios_base::fixed); // save initial formatting state
....
}
Using my preferred ide (C-free) I get a compile error "ios_base"
undeclared. When copying the exact code into Borland C++ BuilderX and
another simple ide 'Quincy' they compile perfectly. Any advice would
be appreciated (I know I can use my other compilers, but I would like to
know what is not happening).
Steven Taylor
Melbourne Australia.