I'm done programming the first part for my Mad Lib program, but when I run testBed to check my program, I keep getting as if there was two COUTs together when I'm trying to ask one question at a time.
I know the problem is in my switch, but I'm not sure how to fix it.
this is the feed back I'm getting from testBed:
Started program
> Please enter the filename of the Mad Lib: madLibWeb.txt
> Web site name: Automobile Magazine.com
> \tVerb: \tPlural noun:
Exp: \tVerb:
drive
> Plural noun: cars
> \tProper noun:
Exp: \tPlural noun:
motorcycles
> \tAdjective:
Exp: \tProper noun:
New York
> \tNoun: \tNoun:
Exp: \tAdjective:
red
> \tBoolean operator:
Exp: \tNoun:
Porsche
> Noun: BMW
> \tFavorite website:
Exp: \tBoolean operator:
xor
> \tAnother website:
Exp: \tNoun:
Reading into a char array with >> will only read until it hits a whitespace. Any characters after that are left in the buffer, which are left for the next prompt to read. If you want to read whole lines into strings, consider using the std::string type and the std::getline() function.