摘要: 1. eclipse下载 PDE(Plug-in Development Environment)版本安装 https://www.eclipse.org/pde/ 2. WindowsBuilder配置 https://www.eclipse.org/windowbuilder/download. 阅读全文
posted @ 2021-09-26 15:10 11YS 阅读(811) 评论(0) 推荐(0) 编辑
摘要: Treeview产生tree或者list,将 GtkTreeModel 接口与 GtkTreeView 小部件结合使用,使用Model/View/Controller模式。 The tree view widget (GtkTreeView) The view column (GtkTreeView 阅读全文
posted @ 2021-07-30 11:04 11YS 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.基类中使用虚函数时,以引用的方式调用,可以动态绑定 #include <iostream> class Quote { public: std::string isbn() const; virtual double net_price(std::size_t n) const; }; clas 阅读全文
posted @ 2021-07-08 17:10 11YS 阅读(17) 评论(0) 推荐(0) 编辑
摘要: placeholder 忘记保存了 阅读全文
posted @ 2021-07-08 14:40 11YS 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 习题 #include <iostream> #include <string> #include <set> class Message { friend class Folder; public: explicit Message(const std:: &str = "") : content 阅读全文
posted @ 2021-06-10 09:44 11YS 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 1.shared_ptr,智能指针构造函数是显式的,不能将一个内置指针隐式转换为一个智能指针,必须直接初始化。 shared_ptr<int> p1(new int(42)); shared_ptr<int> p2 = new int (42); //wrong 习题 12.2编写你自己的StrBl 阅读全文
posted @ 2021-05-31 17:10 11YS 阅读(25) 评论(0) 推荐(0) 编辑
摘要: 习题 11.4编写你自己的单词计数程序,扩展你的程序,忽略大小写和标点。例如,"example."、"example,"和"Example"应该递增相同的计数器。 #include <string> #include <map> #include <iostream> #include <algor 阅读全文
posted @ 2021-05-28 10:07 11YS 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 只读 find(v.begin(), v.end(), 1); count(v.begin(), v.end(), 1); int sum = accumulate(v.begin(), v.end(), 0); //第三个值决定返回值的类型 string s1 = accumulate(v.beg 阅读全文
posted @ 2021-05-26 11:38 11YS 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 顺序容器 容器类型介绍 vector 可变大小数组。支持快速随机访问。在尾部之外的位置插入或删除元素可能很慢。 deque 双端队列。支持快速随机访问。在头尾位置插入/删除速度很快。 list 双向链表。只支持双向顺序访问。在list中任何位置进行插入/删除操作速度都很快。 forward_list 阅读全文
posted @ 2021-04-23 08:58 11YS 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 习题 1.编写函数,接受一个istream&参数,返回值类型也是istream&。此函数须从给定流中读取数据,直至遇到文件结束标识时停止。它将读取的数据打印在标准输出上。完成这些操作后,在返回流之前,对流进行复位,使其处于有效状态。 istream& func(istream &is) { stri 阅读全文
posted @ 2021-04-14 09:51 11YS 阅读(31) 评论(0) 推荐(0) 编辑