- Code: Select all
// This is a simple "signing in" program.
#include <iostream.h>
main()
{
int med; //This is the username. Note: In digits.
char pass[5]; //This is the password.
char correct = Arman; //Pass has to be equal to Arman in case of a successfull sign in.
cout << "Type in your username \n";
cin >> med;
switch (med) { //The switch starts here
case 12: // I chose that 12 should be the correct username.
cout << "Type in your password \n";
cin >> pass;
if (pass == Arman) {
cout << "You have successfully logged in to your account \n";
}
else {
cout << "Your password was incorrect \n";
}
default:
cout << "There is no such username. Try again by starting the program again. \n\n";
}
return 0;
}
char correct = Arman;
Unidentified character 'Arman'. <--- Thats the error message.
Dont get why it pops up.
If I get that fixed I would be able to hand in 2 programs. That might make a better impression. My aim is an A+.
Thanks in advance!



