当前位置: 编程技术>c/c++/嵌入式
C++利用容器查找重复列功能实现
来源: 互联网 发布时间:2014-10-11
本文导语: 代码如下: # include # include # include using namespace std; int main(int argc, char * argv[]) { vector v; //找一些数据来测试 for (int i = 0; i < 50; i++) v.push_back(rand() % 25); for (int i = 0; i < 50; i++) { cout
代码如下:
# include
# include
# include
using namespace std;
int main(int argc, char * argv[])
{
vector v;
//找一些数据来测试
for (int i = 0; i < 50; i++)
v.push_back(rand() % 25);
for (int i = 0; i < 50; i++)
{
cout