Little assistance please.

Ok here is my code: http://pastebin.com/pXYJAnkx
It compiles with no problem, but when it reaches this point is closes:

if (newPassword == PasswordConfirm)
{
Account.open("AccountInfo.txt");
Account << newUsername << "\n" << newPassword;
Account.close();
return 0;
}

I want it to close but i dont think it saves the info to a word file.
What have i done wrong?
i cant find the file where it shud be so something is wrong.
solved.
Topic archived. No new replies allowed.