cin >> “no operator matches these operands”

Issue is saying that string doesn’t have the operator>> method, but it does…

  1. Did you forget #include <string> at the top of that file?
  2. Maybe try using getline(std::cin, allTaxiDetails[I].taxiRank, '\n');.
  3. Define operator>> for your struct.

Leave a Comment