how to match charcter in C++ if code example Example: compare string c++ int compare (const string& str) const;