I would recommend using structures instead of classes if you are planning to keep all the data public. Also, I'm not sure if you already have this but you need to #include <fstream>
It's really hard to tell since you are missing half the program. Try uploading the whole thing and I could help from that.