error C2679: binary ‘>>’ : no operator found which takes a right-hand operand of type ‘std::string’ (or there is no acceptable conversion)

Have you included all of the following headers?

  • <fstream>
  • <istream>
  • <iostream>
  • <string>

My guess is you forgot <string>.

On a side note: That should be std::cout and std::endl.

Leave a Comment