小编dsi*_*h99的帖子

在 C++ 中如何比较 std::array?

对于下面的代码,为什么输出为 1?

#include<iostream>
#include<array>

int main() {
    std::array<int, 5> a { 10, 11, 12, 15, 14 };
    std::array<int, 5> b { 11, 12, 13, 14, 15 };
    std::cout << (a < b);
}
Run Code Online (Sandbox Code Playgroud)

c++ stl comparison-operators c++11 stdarray

1
推荐指数
1
解决办法
180
查看次数

标签 统计

c++ ×1

c++11 ×1

comparison-operators ×1

stdarray ×1

stl ×1