摘要: #include <iostream> #include <string> #include <forward_list> using namespace std; // https://zh.cppreference.com/w/cpp/container/forward_list std::ostream& operator<<(std::ostream& ostr, const std::f 阅读全文
posted @ 2019-12-15 21:11 路边的十元钱硬币 阅读(1434) 评论(0) 推荐(0)
摘要: * std::list 是支持常数时间从容器任何位置插入和移除元素的容器。不支持快速随机访问。它通常实现为双向链表。与 std::forward_list 相比,此容器提供双向迭代但在空间上效率稍低。 阅读全文
posted @ 2019-12-15 15:14 路边的十元钱硬币 阅读(17239) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std; // https://zh.cppreference.com/w/cpp/container/array int main() { ///array arr({ 1,2,3 }); // 非法 array arr1{ { 1,2,3 } }; // 不可以扩容,属于固定大小的数组。... 阅读全文
posted @ 2019-12-15 10:04 路边的十元钱硬币 阅读(8392) 评论(0) 推荐(1)