What's wrong with my code? I'm tring to find a way to compare 2 strings and if have all the characters in two string, with the same quantity, will be valid, otherwise, invalid. The conditions are:
1. User type 2 string (with different characters and quantity, example: str1 = asd || str2: asdfg)
2. Code compares str2 to str1 char by char, im using strN.at(); being N the numeber of the string.
3. Once a character is found in str1 the position can't be reviewed. The same to str2, once a character of str2 was found in str1, the positions can't be reviewed.
4. If "asd" was found in str2, it is a valid arument.
5. If reach to the end of the str2, with no success of comparison, will be invalid.
My compiles aren't running the DO...WHILE, he just execute until std::cout << "\nYou chose: " << str1 << " how string 1 and: " << str2 << " how string 2.";
But at the same, my compiler continues announcing warnings on the lines 26 and 28, so didn't running, the warning is "comparison between signed and unsigned integer expressions."
Right. Unless I misunderstand the problem. You're just trying to determine if the strings are equal right? To do that, just compare corresponding characters of the strings. If you find two that aren't equal then the strings aren't equal.