I'm pretty new to C++ (only one semester under my belt right now)... however, just curious, what are you '#include'ing? From what I can tell, that may be the problem, as it is used 4 times, but nothing is declared after. I'm thinking you're missing:
#include <iostream>
#include <string>
#include <fstream>
#include <list>
Try that out and lemme know what happens!
Edit: My bad, the vbCode of this website blanks out the template declarations... weird
Kinda figured you didn't forget them anyways