当std :: sort中的比较函数始终返回true时,为什么会出现运行时错误?
bool compare(string a, string b)
{
return true;
}
vector<string> Test;
for (int i = 0; i < 7; i++)
Test.push_back(string("0"));
sort(Test.begin(), Test.end(), compare);
Run Code Online (Sandbox Code Playgroud)