#include <fstream>
#include <iostream>
#include <cstring>
usingnamespace std;
int main()
{
char str[10];
char name[50];
char pass[50];
ofstream a_file ( "example.txt" , ios::app);
do { cout<<"Please enter your name: ";
cin.getline ( name, 50 );
if ( strcmp ( name, name? ) == 0 ) \\ the second name needs to be called from the text file allready created
cout<<"This User has account already.\n";
} while ( strcmp ( name, name? ) == 0 );
a_file<< "Username: " << name << "\n";
cout<<"Please enter your password: ";
cin.getline (pass, 50 );
a_file<< "Password: " << pass << "\n";
a_file.close();
ifstream b_file ( "example.txt" );
cout<<"Regestered new Account!\n";
cin.get();
}