std::string does not have an implicit conversion to a char * which is what fscanf is expecting in the third parameter. &YO will pass the base address of the string instance which is NOT where the memory is allocated for the data part of the string.
If you're going to use C files and routines, use char and strcmp.
If you're going to use C++, use streams and the >> operator.