There are several problems with your code:
WordList
is not defined anywhere. You should define it before you use it.#include <string>
before you can use the string class and iostream before you use cout
or endl
.string
, cout
and endl
live in the std
namespace, so you can not access them without prefixing them with std::
unless you use the using
directive to bring them into scope first.