return multiple pointers

Hi, im trying to pass and return two pointers or effectively two different types of arrays from one function to another. I went through tuples but they can pass multiple variables but not arrays. Could someone please help me with a simple example.

Thank You
Am I missing something? Why can't you just pass them both as two arguments to the function?
Multiple value return is awkward in C++:

Ex:
T a; U b; std::tie(a, b) = make_tuple(T{}, U{});
Which isn't too terrible, unless you want a and b to be const, which is a common thing.

Not even the immediately-invoked lambda expression trick can really save us now -- this gets ugly, fast.

Can you show some code? What are you actually trying to do? There's probably a better way.
Last edited on
Topic archived. No new replies allowed.