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

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -