Program will exit out if "n" is inputted?

If I input "n" for the first question, the program drops out instead of continuing to the next question. How can I allow the program to go to the next question? I've enabled 0 to be entered if the user wants to exit (all of this is in a do while statement)

Here's a snippet of main:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
cout << "This program is designed to list Pokemon. You may remove a Pokemon or add a Pokemon." << endl;
    cout << "Enter 0 to quit." << endl;
    cout << "Here are your Pokemon:" << endl;
    displayPokemon();

    //begin do-while of options
    do{
        //remove pokemon
        cout << "Would you like to remove a Pokemon? (Y/N): ";
        cin >> removePokemonChoice;
        cin.ignore(5, '\n');
        if (toupper(removePokemonChoice) == 'Y')
        {
            deletePokemon();
            cout << "New list:" << endl;
            displayPokemon();
        }
        if (removePokemonChoice == 0); //exit out
            return 0;

        //add pokemon
        cout << "Would you like to add a Pokemon? (Y/N): ";
        cin >> addPokemonChoice;
        cin.ignore(5, '\n');
        if (toupper(addPokemonChoice) == 'Y')
        {
            addPokemon();
            cout << "New list:" << endl;
            displayPokemon();
        }
        if (addPokemonChoice == 0) //exit out
            return 0;
    }while (toupper(addPokemonChoice) == 'Y' || (toupper(removePokemonChoice) == 'Y'));
closed account (SECMoG1T)
1
2
 if (removePokemonChoice == 0); //there is a semicolon here
            return 0;/// this is unconditional return and will aways be executed 
1
2
if (removePokemonChoice == 0)
{break;}


should do the job. Now if you enter anything except Y, it should continue to the next question.
Yes that fixes the issue! But the 0 to quit doesn't apply anymore. If you have any more suggestions I will take them. I may just take them out and the user will have to just enter n twice.
I assume removePokemonChoice is a char. 0 is an int. '0' is a char.
I've been making so many silly mistakes tonight. Thank you for your help! It worked.
Topic archived. No new replies allowed.