摘要: 以下内容仍在更新完善... 函数模版 代码示例:用于比较两个数大小的函数模版 template <typename T> int compare(const T &v1, const T &v2) { if( v1 < v2 ) return -1; if( v1 > v2 ) return 1; 阅读全文
posted @ 2020-07-18 21:32 Neko_YG 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 以下内容仍在更新完善... Vector 初始化: vector<int> a(x); 定义x个整型元素的初始值不确定的向量 vector<int> a(x,y); 定义x个整型元素的初始值为y的向量 vector<int> a(b); 将b向量的值复制给a vector<int> a(b.begi 阅读全文
posted @ 2020-07-18 20:49 Neko_YG 阅读(163) 评论(0) 推荐(0) 编辑