@Yksisarvinen originally commented it but he erased the comment for some reason. Using (*values)
to dereference the dynamic array vector<double>* values
allowed me to send it to the other function easily and get the result. A couple of others answered but @Yksisarvinen was the first to mention it.