how to compare std::vectors?

Hi
I`m sorry for this stupid question.
How can I compare two vectors? I need to know whether vectors are equal or not. I can do it by comparing item per item, but I suspect that there is normal method.
With best regards,
Yura.
[257 byte] By [YuraV] at [2007-11-18 19:19:30]
# 1 Re: how to compare std::vectors?
Just use "==" and "<" respectively.

#include <vector>

using namespace std;

int main()
{
vector<int> a, b;

a.push_back(10);
b.push_back(11);

if (a == b) {
} else {
}
return 0;
}
Yves M at 2007-11-9 0:32:29 >
# 2 Re: how to compare std::vectors?
Hmmmmmm
it realy works. :) Thanks a lot!

With kind reagrds,
Yura
YuraV at 2007-11-9 0:33:31 >