Here I am putting 2 Number into a std::vector<double> and sort these numbers like this.
When putting Number1 and Number2 wich are declared variables into the vector, the Number 5 and 10 are put into the vector.
If I after the sort write this: Numbers[0], this will give me the value of 10 with from the beginning was the variable: Number2.
What I wonder is if it is possible to receive the variablename again from the sorted vector.
Is it possible to find the variablename from Numbers[0] wich is Number2 ?
std::vector<double> Numbers;
double Number1 = 5;
double Number2 = 10;
Numbers.push_back(Number1 );
Numbers.push_back(Number2 );
//Sort the vector
std::sort(Numbers.begin(), Numbers.end());