I don't know if this is the best possible solution, but I guess it isn't that complex, considering that it's the first thing I thought of.
Save the numbers into an array or some sort of STL container. Sort the array/container. Use a recursive function to look through the array/container. The recursive function should take 6 parameters:
the array/container of numbers (pass by address)
a new array/container of numbers to store the numbers you've "found" (pass by value)
an unsigned integer for how far into the first array/container you've checked
the number of elements you still have to find
the current sum of the numbers in the second array/container
the target sum