I'm writing a program that reads txt file that has a mad libs story in it like this
Zoos are places where wild <plural_noun> are kept in pens or cages <#> so
that <plural_noun> can come and look at them. There is a zoo <#> in the park
beside the <type_of_liquid> fountain . When it is feeding time , <#> all
the animals make <adjective> noises . The elephant goes <{> <funny_noise>
<}> <#> and the turtledoves go <{> <another_funny_noise> . <}> My favorite
animal is the <#> <adjective> <animal> , so fast it can outrun a/an
<another_animal> . <#> You never know what you will find at the zoo. <#>
Where
# Newline character means No space before or after.
{ Open double quotes means Space before but not after.
} Close double quotes means Space after but not before.
[ Open single quote means Space before but not after.
] Close single quote means Space after but not before.
anything else A prompt
This is what the program is suppose to look like.
Please enter the filename of the Mad Lib: madlibZoo.txt
Plural noun: boys
Plural noun: girls
Type of liquid: lemonade
Adjective: fuzzy
Funny noise: squeak
Another funny noise: snort
Adjective: hungry
Animal: mouse
Another animal: blue-fin tuna
Zoos are places where wild boys are kept in pens or cages
so that girls can come and look at them. There is a zoo
in the park beside the lemonade fountain. When it is feeding time,
all the animals make fuzzy noises. The elephant goes "squeak"
and the turtledoves go "snort." My favorite animal is the
hungry mouse, so fast it can outrun a/an blue-fin tuna.
You never know what you will find at the zoo.
Then the program redisplays the mad libs story with all the corrections My problem is I don't know how to get it so that I let the user input the adjectives, nouns, and such. This is my program so far:
#include <iostream>
#include <fstream>
using namespace std;