Created
November 10, 2017 19:17
-
-
Save devramx/a653a6833ceb4ef84c37b6cdd3f59563 to your computer and use it in GitHub Desktop.
Multiple return values from function ( < C++17 )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <tuple> | |
auto AnswerToEverything() -> std::tuple<int, int> | |
{ | |
return std::make_tuple(42, 9001); | |
} | |
int a=0, b=0; | |
std::tie(a,b) = AnswerToEverything(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment