Can you compare two strings simply by putting string1==string2?
void ex_file_licensing::compare_license(const std::string &reference,
const std::string &result)
{
if (reference == result)
cout << "It's the same" << endl;
else
cout << "It's diffrent" << endl;
return;
}
If yes will this code work properly or should I make some modifications.
Thanks everyone
It depends on what notion of string equality you want to test for. If you want to check if the contents are byte-to-byte identical, then yes, it’s the right way to test if the strings are equal.