0

I think the question is clear.

Let me rephrase it.

In a function, there are two different sets of calculations. I want the function to return both "a" and "b". (both have same type(struct) but, a could be *pointer, whereas b could be **pointer)

But from what I am aware of is, that I can only return one.

Im not so familiar with class. but I know that with class u can get both back by doing something like x.a (returns a) and x.b (returns b).

Is there any to do this just in a function?

hoffnung
  • 49
  • 2
  • 5
  • I think you need to be more specific. For example, do `a` and `b` have different type? Also, see http://stackoverflow.com/questions/15365860/returning-two-variables-in-a-c-function/15365938#15365938 – juanchopanza Aug 19 '15 at 05:32
  • If they are related (logically. use class or struct for them) otherwise make two separate functions. – Ali Kazmi Aug 19 '15 at 05:40

0 Answers0