I asked this question before but the suggestions don't work so I have tried to make my question more clear.
I have a function that returns a std::pair<int, double>
but the parameters for the function as follow function(int g, double a);
. This function then using make_pair
to make a pair with the first being the int and the second being the double. It returns the pair.
I want to create another function to use the pair from the previous function and view the data in the pair, i.e. both first and second. Is it possible to pass the return of the previous function as a parameter for my new function so the second function can view the data? I am unsure about the syntax in C++.