thanks edoceo for the help. i actually just figured it out right now. in case anyone was wondering, here is what it should look like (or at least what works for me):
Code:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string icecream = "", answer, sauce = "", sprinkles = "";
int kwb = 0;
do
{
if (kwb++ > 100)
break;
if (icecream == "")
cout << "Do you want chocolate, vanilla or twist? " << endl;
if (sauce == "")
cout << "Hot fudge, chocolate or strawberry sauce? " << endl;
if (sprinkles == "")
cout << "Do you want sprinkles (yes/no)? " << endl;
getline (cin, answer);
if (answer == "chocolate")
{
if (icecream == "")
icecream = "chocolate";
else if (sauce == "")
sauce = "chocolate";
}
else
{
if ((answer == "vanilla")||(answer == "twist"))
icecream = answer;
if ((answer == "hot fudge")||(answer == "strawberry"))
sauce = answer;
if ((answer == "yes")||(answer == "no"))
sprinkles = answer;
}
} while ((icecream == "")||(sauce == "")||(sprinkles == ""));
if (sprinkles == "yes")
cout << "You ordered " << icecream << " ice cream with " << sauce << " sauce and sprinkles." << endl;
if (sprinkles == "no")
cout << "You ordered " << icecream << " ice cream with " << sauce << " sauce without sprinkles." << endl;
}