C ++:比较两个向量 [英] C++: Comparing two vectors

查看:142
本文介绍了C ++:比较两个向量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法比较两个向量?

Is there any way to compare two vectors?

if (vector1 == vector2)
    DoSomething();

注意:目前,这些向量不排序,

Note: Currently, these vectors are not sorted and contain integer values.

推荐答案

检查 std :: mismatch 方法。

比较向量已在 DaniWeb论坛以及已回答

C ++:比较两个向量

检查下面的SO post。将有助于你。他们用不同的2方法实现了同样的效果。

Check the below SO post. will helpful for you. they have achieved the same with different-2 method.

比较两个向量C ++

这篇关于C ++:比较两个向量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆