mardi 28 mars 2017

Can`t jump to a function made globally from within a class

void Manager::Welcome_Login()
{
    char Password[100];
    int Choice1;
    system("cls");
    cout << " Welcome Back ..\n";

    cout << " Press ( 1 ) to enter your password  OR press ( 2 ) to go back to   the previous screen";
    cin >> Choice1;
    if (Choice1 == 1)
    {
        cin.getline(Password, 100);
    }
    else if (Choice1 == 2)
    {
        User();
        cout << "Read";
    }
}


void User()
{
    int userx;
    cout << "\n1.) Manager ";
    cin >> userx;
    switch (userx)
    {
    case 1: 
        Man.Welcome_Login();
        break;

    default:
        cout << "Please check your input and try again !!";
        system("pause");
        break;
    }
}

When Choice1 == 2 I want it to jump to the function User. What is the error? Please do note that void User() is made outside of any function body. Also Manager is a class.

Aucun commentaire:

Enregistrer un commentaire