I have this piece of code,
void saveGame(vector<Usuario *> vector) {
fstream file_obj;
file_obj.open("users.dat");
for(Usuario *u: vector){
string auxName,auxPassword;
auxName = u->getName();
auxPassword = u->getPassword();
//file_obj << auxName +" "+auxPassword;
file_obj << "Hola";
}
file_obj.close();
}
The issue is that I do not record anything in the file, I have tried commenting and writing the "hello" but it does not say it either.
Someone can give me a cable?
Thank you very much in advance