< Previous | Contents | Next >

Setting Up the Program

As usual, I start with some comments and include the files I need.

// Hangman

// The classic game of hangman


#include <iostream> #include <string> #include <vector> #include <algorithm> #include <ctime> #include <cctype>


using namespace std;

Notice that I include a new filecctype. Its part of the standard library and it includes functions for converting characters to uppercase, which I use so I can compare apples to apples (uppercase to uppercase) when I compare individual characters.

Introducing Hangman 143