求助 std::max
  • 板块学术版
  • 楼主STLvector
  • 当前回复1
  • 已保存回复1
  • 发布时间2024/10/11 11:42
  • 上次更新2024/10/11 11:44:06
查看原帖
求助 std::max
637565
STLvector楼主2024/10/11 11:42
#include <iostream>

int main()
{
	int x=std::max({1,2,3});
	std::cout<<x;
	return 0;
}

为什么这段代码不能过编?

不是有 std::max(initializer_list<>) 的函数原型吗

而且我记得之前用过的

2024/10/11 11:42
加载中...