Hi, I'm pretty new to programming and currently making a program that stores username's and passwords in a csv file . it also allows the user to log in using a previously created username and password. At the moment, it runs fine but does not store any information.
Any help with writing ( create new account ) and then reading ( for log on ) would be great. Thanks.
I took out the binary and changed a few things. It writes the information to the CSV file fine. But for the next stage ( the log in ), I need to read the password from the csv after the user has inputed their username and password. It then needs to cross check the input password with the password from the csv file.
Thanks IdeasMan for the help with the binary. I still don't understand switch statements, but I might read up about that later. Thanks
switch ( MenuOption )
{
case'A':
UseCalculator();
break;
case'B':
PlayGuessingGame();
break;
case'C':
EnterText();
break;
default:
cout << "'" << MenuOption << " Is not a choice." << endl;
break;
}
Obviously , it does a main menu. This code should be inside a ProcessMenu function. Notice how it calls functions to carry out each menu option.
What this means is that you can call ShowMenu and ProcessMenu functions in main , which then go off and call the other functions. This way, you can divide & conquer - and you won't have all the code in main.
Edit:
The ShowMenu function just prints the menu, nothing else.