so... this is what i would do...
#include <fstream>
#include <iostream>
using namespace std;
int main(){
fstream file("myfile.txt", ios::in | ios::out);
char *name;
cout<<"Enter your name: ";
cin>>name;
file.write((char*)&name,sizeof(name));
file.close();
}
guess there are some mistakes in the write line... correct me if wrong plz...