In my first if statement, Im trying to iterate, if pName > 0,then run “enter the ages” else run “Enter the age” (for only 1age)
//Runs X times(consticted by pAmount) obtaining name(s) andage(s)
for (int i = 0; i < pAmount; i++)
{
cout << “Enter thename(s):”;
getline(cin, pName);
if (pName > 1)
{
cout <<“Enter the age:”;
cin >>age;
cin.ignore();
}
else
{
cout <<“Enter the age:”;
cin >>age;
cin.ignore();
}
p[i].setName(pName); //Saves names in array
p[i].setAge(age); //Saves the ages in
PayPal Gateway not configured
PayPal Gateway not configured