版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/artisans/article/details/81260564
求最大值
vector<int> vv { 11,223, 22 };
auto itor = std::max_element(vv.begin(), vv.end());
if (itor != vv.end())
{
cout << "max " << *itor << endl;
}
int z = std::max({ 11,223, 22 });