chinese characters can be compared in C++
#include <iostream> #include <string> int main() { std::string a = "妈妈"; std::string b = "妈妈"; std::cout << a.compare(b) << std::endl; //0 }