). Whenever I run it, of course, I get some errors, one of which crops up with the char yesOrNo. Could someone please help me in pointing out flaws I have made and assist me in making the whole thing turn from a misunderstandable piece of jargon into something that'll actually work. (Don't expect anything too fancy - switch loops are still foreign to me.)Code:
//Log in program
//v.1.0
#include <iostream>
using namespace std;
//Function Declarations
void LogInDefault();
void NewLogIn();
char ContinueQ();
void ContinueAct();
//Global variables
string username , password , password2 , usernameTrue , passwordTrue;
int newUserQuestion;
char secPrompt;
//Entry point for program
int main()
{
void LogInDefault();
void NewLogin();
char ContinueQ();
void ContinueAct();
return 0;
int a;
cin >> a;
}
void LogInDefault()
{
cout << "Welcome to LoggerIn Pro (v.1.0.5)!";
cout << "\n\n\tUsername:";
cin >> username;
cout << "\n\tPassword:";
cin >> password;
cout << "\n\n\t\t(New user? Press 1.)";
cin >> newUserQuestion;
}
void NewLogin()
{
if ( newUserQuestion == 1)
{
cout << "Please set up a user name and password.\n";
cout << "Enter desired user name:\n\t";
cin >> username;
username = usernameTrue;
cout << "Enter desired password:\n\t";
cin >> password;
cout << "Re-enter desired password:\n\t";
cin >> password2;
password2 , password = passwordTrue;
}
if ( password == password2 || username == username )
{
cout << "\n\n\tThank you for logging in, "
<< username << "" << endl;
}
}
char ContinueQ()
{
char yesOrNo;
cout << "\n\t\tDo you wish to proceed to logging in now?"
<< "\n\t\t([Y]es or [N]o)";
cin >> yesOrNo;
return yesOrNo;
}
void ContinueAct()
{
if ( yesOrNo )
{
if ( yesOrNo == Y )
{
void LogInDefault();
}
else if ( yesOrNo == N )
{
cout << "\n\t\tAre you sure?"
<< "\n\t\t([Y]es or [N]o)";
cin >> jessica;
if ( secPrompt == Y )
{
cout << "\n\t\tGoodbye!";
}
else if ( secPrompt == N )
{
void LogInDefault();
}
}
}
else
{
if ( usernameTrue == username || passwordtrue == password )
{
cout << "\n\t\tThank you for logging in."
<< "\nGoodbye!";
}
else
{
cout << "Log In failed. Goodbye!\n";
}
}
}

