Make sure you included <string>. It looks like it cannot find the operator>> for the string class. I assume that your operator>> is a friend, because it is accessing private member variables. If not, it should be. Also, you should return istream& instead of istream, although that shouldn't be affecting your program right now.