![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c++学习
dahai018
这个作者很懒,什么都没留下…
展开
-
vector 包含 结构体排序
C++中当 vector 中的数据类型为基本类型时我们调用std::sort函数很容易实现 vector中数据成员的升序和降序排序,然而当vector中的数据类型为自定义结构体类型时,我们该怎样实现升序与降序排列呢?有两种方法,下面的例子能很好的说明: 方法1: 我们直接来看代码吧,比较简单,容易理解: #include "stdafx.h" #include &...原创 2010-05-30 22:30:41 · 162 阅读 · 0 评论 -
split函数
vector<string> splitEx(const string& src, string separate_character) { vector<string> strs; int separate_characterLen = separate_character.size();//分割字符串的...原创 2010-05-30 23:21:09 · 117 阅读 · 0 评论 -
[yc]详解link
原文摘自:http://www.cppblog.com/shifan3/archive/2007/01/05/17325.html 详解link有些人写C/C++(以下假定为C++)程序,对unresolved external link或者duplicated external simbol的错误信息不知所措(因为这样的错误信息不能定位到某一行)。或者对语言的一些部分不知道为...原创 2010-06-08 23:02:24 · 235 阅读 · 0 评论