< Previous | Contents | Next >
As usual, I start the program with some comments and include the necessary files.
// Mad-Lib
// Creates a story based on user input
#include <iostream> #include <string>
using namespace std;
string askText(string prompt); int askNumber(string prompt);
void tellStory(string name, string noun, int number, string bodyPart, string verb);
You can tell from my function prototypes that I have three functions in addition to main()—askText(), askNumber(), and tellStory().