smallest difference pairs

Apr 14, 2018 at 10:40pm
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 Apr 14, 2018 at 10:52pm
Apr 15, 2018 at 9:11pm
Apr 15, 2018 at 9:20pm
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
Apr 16, 2018 at 2:16am
Post your code that uses arrays.
Apr 16, 2018 at 8:31am
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.