Comparing two strings C++ -
can compare 2 strings putting string1==string2?
void ex_file_licensing::compare_license(const std::string &reference, const std::string &result) { if (reference == result) cout << "it's same" << endl; else cout << "it's diffrent" << endl; return; } if yes code work or should make modifications.
thanks everyone
it depends on notion of string equality want test for. if want check if contents byte-to-byte identical, yes, it's right way test if strings equal.
Comments
Post a Comment