So, in my code, if you enter something you're not supposed to, I wanted it to go back to the top, and repeat it the process until you choose one of the allowed choices.
Code:
#include <iostream>
using namespace std;
{
string gender;
cout << "\nBoy or Girl\n";
cin >> gender;
if(gender == "boy")
{
gender = "Boy";
}
cout << "You are a ";
cout << gender;
cout << "\n";
if(gender == "Boy")
{
#include "Boy.h"
}
else if(gender == "Girl")
{
#include "Girl.h"
}
if(gender != "Boy","Girl")
{
cout << "Please, pick Boy or Girl!";
}
}