cout << "Welcome to Frozen Tongue Ice Cream Shop\n"<<endl;
cout << "Please enter the flavor of icecream sold or 'STOP' to exit.\n"<<endl;
cout << "Flavors avaliable:\n"<<endl;
cout << "chocolate\n"<<endl;
cout << "valnilla\n"<<endl;
cout << "strawberry\n"<<endl;
cout << "mint\n"<<endl;
cout << "rocky road\n"<<endl;
cout << "mocha\n"<<endl;
cout << "Enter flavor : ";
getline (cin, flavor) >> flavor;
flavor = "tolower (flavor)";
choc = chocolate;
van = vanilla;
str = strawberry;
mt = mint;
rrd = rocky_road;
mc = mocha;
cout <<"Now enter number of scoops sold\n"<<endl;
cin >> count;
flavorI = atoi("flavor");
if ( flavor != "STOP" || flavor != "stop")
switch (flavor)
{
case 'choc' :
chocCount + count;
break;
case 'van':
vanCount + count;
break;
case 'str':
strCount + count;
break;
case 'mt':
mtCount + count;
break;
case 'rrd':
rrdCount + count;
break;
case 'mc':
mochaCount + count;
break;
default:
cout<<"You have entered an unavaliable flavor. The program will now end."<<endl;
exit(1);
}
}
else
{
cout<<"You have chosen to exit the program. Thank you."<<endl;
exit(1);
}
flavor = "tolower (flavor)"; //why are there double quotes?
//tolower takes a parameter of a character not a string.
//all these are missing quotes on the strings
choc = chocolate;
van = vanilla;
str = strawberry;
mt = mint;
rrd = rocky_road;
mc = mocha;
switch (flavor) //takes parameter of int/char not a string
case'choc' :
//all of your cases are wrong. First of all it takes an int/char not a string
//secondly a character is different than a string(list) of characters
chocCount + count;
//this does nothing
//all of these should be ++variable; (increment by one)