how can we return the pair of vectors generated in the factorize function. when i call return factors, an error is being generated that it isnt possible to return a vector pair as a single vector
Returning a pair of vectors
@vector.9974, since you are returing vector<pair<int,int> > so your return type should also be vector<pair<int,int> > which is not the case in your program as your return type is vector instead of vector<pair<int,int> > ,also at line 99 it should be ,
vector<pair<int,int> > factors = factorize(m, primes);
instead of
vector factors = factorize(m, primes);
corrected code :- https://ide.codingblocks.com/s/363629
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.