Program won't run correctly

I've got the following program, a header file, .cpp file, and p2.cpp, and it does not run correctly. It works when typing in a text document, but after that, it does not read the file how I want it to. I used the cout statements in main of p2.cpp to see when exactly it crashes, it cout'd the statements until it got to readFile, then it crashes. Here's all the code.
Header:

Line 149 (p2.cpp) you have void readFile(ifstream &filein, WordList WL) which is probably not what you have. You want to pass the 'WL' by reference or pointer so add the reference operator & (..., WordList &WL);

One important thing when working with classes, make sure you initialize all your primitive data types int/long/char and pointers.

By looking at your constructor, you never initialized int indx; so when you try adding a word in line 155 (p2.cpp file) in function void readFile(ifstream &filein, WordList WL) with WL += word;. You can see that you're trying to use the variable 'indx' but you never properly initialized it, so it contains garbage data and your program crashes as a result.