smallest difference pairs

how would a write recursion program in C++ when trying to get Smallest Difference pair of values between two vectors?i know how to do it with array but how would we do it with std::vectors would we need to use std::sort still?any advice

Last edited on
i cant use sort for this function im making i try so many thing to do with vectors it just doesnt work so i am lost
Post your code that uses arrays.
You say that "std::sort just doesn't work with std::vector".

However, the example in documentation does exactly that:
http://www.cplusplus.com/reference/algorithm/sort/
Topic archived. No new replies allowed.