A.fdat.seekg(0,ios::beg); B.fdat.tellg(0,ios::beg); C.fdat.seekp(0,ios::beg); D.fdat.tellp(0,ios::beg);
A.outfile.write((double*)&data,sizeof(double)); B.outfile.write((double*)&data,data); C.outfile.write((char*)&data,sizeof(double)); D.outfile.write((char*)&data,data);
A.ofstream fs("date.dat",ios::trunc); B.ifstream fs("date.dat",ios::trunc); C.ofstream fs("date.dat",ios::out); D.ifstream fs("date.dat",ios::in);