how to check if string time are smaller in c++ code example Example: compare string c++ int compare (const string& str) const;