-1

I have defined a method for class Rettangolo like this

std::tuple<int, Point, Point> Rettangolo::interseca(Point *sol_p, Point *pvet){
//code
//code
return std::make_tuple(1, *pto1, *pto2); //example of return
//more code
}

My problem is to use the returned values in main. I need to do

(*it)->interseca(sol,normperp);

but basically i don't know how to save and so use the returned values since my tuple type isn't standard

Thanks for your help

Mark Garcia
  • 17,424
  • 4
  • 58
  • 94

1 Answers1

1

Assign the result of the call to a variable:

std::tuple<int, Point, Point> tpl = (*it)->interseca(sol,normperp);

or

auto tpl = (*it)->interseca(sol,normperp);
juanchopanza
  • 223,364
  • 34
  • 402
  • 480