I have a question, my code doesn't work right, I try to put in a break, so it understands to go to the next case, but it doesn't do anything...Does anyone know how to make it run so that the Username enter in correctly and run the rest of my program.
-Mike
P.S. - When I put breaks on every like, I get a runtime termination error, which made me sad:(
for (i=0; i<5; i++)
{
switch (i)
{
case 0: fix = 0146; username = fix; c = 1; //102 - f
case 1: fix = 0156; username.insert (c++,fix); //110 - n
case 2: fix = 0141; username.insert (c++,fix); //97 - a
case 3: fix = 0162; username.insert (c++,fix); //114 - r
case 4: fix = 0153; username.insert (c++,fix); //107 - k
default: fix = 0154; username.insert (c++,fix); break; //108 - l
}
}
username.replace (7,1,"");
// cout << username;
do
{
cout <<"Enter Username to Enter: ";
cin >> input;
} while (input != username);