Skip to content

Instantly share code, notes, and snippets.

@maxgoren
Created October 22, 2021 18:47
Show Gist options
  • Save maxgoren/fee29bb9a8d1dba628cc466c7ffabee6 to your computer and use it in GitHub Desktop.
Save maxgoren/fee29bb9a8d1dba628cc466c7ffabee6 to your computer and use it in GitHub Desktop.
std::tuple<double, string, float, float> baz(int foo, int bar)
{
double ans = double(foo)/double(bar);
return std::make_tuple(ans, "Just Because.", float(foo), float(bar));
}
int main()
{
auto [answer, reply, foo, bar] = baz(8, 3);
std::cout<<foo<<"/"<<bar<<" = ";
std::cout<<answer<<" - "<<reply<<"\n";
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment