If anybody has the time to spare to help me out with this I'd be very grateful. Been working on this for hours and can't figure out how to get rid of the last two errors.
The problem: Accept input of two strings using getline(), sort the strings, and use function: "bool isAnagram(const string &s1, const string &s2)" to return if the two strings are anagrams. Use a loop to continue checking anagrams until the user ends the loop.
My problem: The error that I'm having is saying that the compiler cannot convert std::string to char in the sortString function. I have no idea how to fix this without changing all of the code to use 'char', which would go against the directions.
At a few places in the fuction you are assigning to or from "temp", which is a string, the destination being a character. The error is saying that you cannot assign a string to a char variable, and there is no way to automatically coerce the string to a char.
Just declare "temp" as char rather than string and the program will compile. (I'm not saying it will necessarily work, but it will compile without error.)