> I am trying to append to a file. However, the compiler gives
me
> the following error:
>
> 'ios_base' undeclared
> (first use this function)
>
> The code is below. Any idea what I am doing wrong? Thanks, Alan
>
> #include <fstream>
>
> int main()
> {
> fstream append_file;
>
> append_file.open("test_append.txt", ios_base::app);
> append_file << "This is a line of text." << endl;
> append_file.close()
>
> return 0;
> }
>
>
|