I am still new with fstream topic and I have some enquiries about using it.
Based on the tutorial shown, I managed to understand a little about it but when I copy the first few lines,
#include <fstream.h>
void main
{
ofstream file;
file.open("file.txt"); //open a file
file<<"Hello file\n"<<75; //write to it
file.close(); //close it
}
it show me an error of
error: invalid function declaration
and also
#warning This file includes at least one deprecated or antiquated header. \
Please consider using one of the 32 headers found in section 17.4.1.2 of the \
C++ standard. Examples include substituting the <X> header for the <X.h> \
header for C++ includes, or <iostream> instead of the deprecated header \
<iostream.h>. To disable this warning use -Wno-deprecated.
#endif
please help me out, experts of C++.