First of all, Im not too good at c++. so please take it easy on me.
I try to change the password but i only want to change a certain password in the text file.But when the text file got re-write like only one new password exits. the whole file got re-write.:(
void Passchange()
{
string tempass;
system("cls");
cout<<"enter current password: ";
cin>>tempass;
if(tempass==inpass)
{
cout<<"utility to change password stored in file\n";
cout<<"CHANGE PASS TO: ";
cin>>user;
ofstream Passfile("user.txt", ios::out);
Passfile<<user;
Passfile.close();
cout<<"password successfully changed";
getch();
main();
}