cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
compare 2 vector lists
compare 2 vector lists
Sep 24, 2012 at 11:54am UTC
dempsey
(4)
Hey everybody,
i write a small programm which contains 2 vector lists and everything i want to do is to compare both vector liists. i believe this is a easy question :) in the end i want to filter out the difference between two files
Last edited on
Sep 24, 2012 at 12:07pm UTC
Sep 24, 2012 at 12:03pm UTC
coder777
(8444)
You mean probably std::vector.
comparison operators do exists. So
1
2
3
4
std::vector<
int
> a; std::vector<
int
> b;
if
(a == b) ...
Can easily be done. Note that they need be of the same type.
filter out the differences is of course more complex. It depends on the requirements
Topic archived. No new replies allowed.