# Std::vector\<std::string\> comparer 2 tableaux ?

**URL:** <https://www.debian-fr.org/t/std-vector-std-string-comparer-2-tableaux/56023>\
**Category:** Programmation\
**Created:** [Février 21, 2016, 1:59 UTC](https://www.debian-fr.org/t/std-vector-std-string-comparer-2-tableaux/56023 "2016-02-21T13:59:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![panthere](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@panthere](https://www.debian-fr.org/u/panthere)\
**Post date:** [Février 21, 2016, 1:59 UTC](https://www.debian-fr.org/t/std-vector-std-string-comparer-2-tableaux/56023/1 "2016-02-21T13:59:10Z")

</div>

bonjours,

Qu’elle est le moyen le plus simple de savoir si 2 tableaux de type std::vectorstd::string son different ?

j’ai penser a

```auto
std::vector<std::string> a
std::vector<std::string> b

if (a != b) {} else{}
```

j’ai pas tester car c’est la suite qui m’interesse:  
Si c’est possible je voudrai savoirs sur quoi et comment la comparaison a lieux. ?  
il les parcourt ?  
il ce contente de regarder la taille ?  
un autre manière ?

Merci d’avance

---

<div class="post-metadata">

**Author:** ![MisterFreez](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/m/bb73d2/32.png) [@MisterFreez](https://www.debian-fr.org/u/MisterFreez)\
**Post date:** [Février 21, 2016, 1:59 UTC](https://www.debian-fr.org/t/std-vector-std-string-comparer-2-tableaux/56023/2 "2016-02-21T13:59:10Z")

</div>

Je suis sur mon téléphone portable donc c’est pas pratique pour moi de faire cette recherche. Sur cppreference tu pourras trouver une description détaillée de ce que fait ou pas l’opérateur = des vecteur. Dans le cas où il ne ferait pas ce que tu veux tu devrais pouvoir trouver dans std::algorithme quelque chose qui t’aidera.

Edit : Voila [fr.cppreference.com/w/cpp/contai … erator\_cmp](http://fr.cppreference.com/w/cpp/container/vector/operator_cmp)

---

<div class="post-metadata">

**Author:** ![panthere](https://www.debian-fr.org/letter_avatar_proxy/v4/letter/p/5daacb/32.png) [@panthere](https://www.debian-fr.org/u/panthere)\
**Post date:** [Février 21, 2016, 1:59 UTC](https://www.debian-fr.org/t/std-vector-std-string-comparer-2-tableaux/56023/3 "2016-02-21T13:59:27Z")

</div>

Merci pour le lien, ![:023](https://www.debian-fr.org/uploads/default/original/1X/3c587556c0cc11389317c03a60788d77ceebd307.gif "OK")
