Need help with this program I'm trying to make
I'm trying to make a program that ask you to make a user name and password and store it but i have no idea how to store it. here's what i have so far it is just the basic out line so you know what I'm talking about.
Code:
#include <iostream>
#include <stdio.h>
#include <string>
using namespace std;
string C_UserName; // Creat a username
string C_PassWord; // creat a password
char UserName[26]; // If you all ready have an account
char PassWord[26]; // if you all ready have an account
string CreatAcc; // Creating a account or not.
int main() {
cout << "Creat Account \n>";
cin >> CreatAcc;
if ( ( CreatAcc == "Yes" ) || ( CreatAcc == "yes" ) ) {
cout << "Creat Username \n>";
getline (cin, C_UserName);
cout << "Creat Password \n>";
getline(cin, C_PassWord);
} else if ( ( CreatAcc == "No" ) || ( CreatAcc == "no" ) ) {
cout << "Enter your Username \n>";
cin >> UserName;
cout << "Enter your Password \n>";
cin >> PassWord;
} else {
cout << "ERROR!!!!\n";
}
system ( "Pause" );
return(0);
}
remember this is a basic out line not even close to being done.