0

I have declared a map like below. What I have some problem with is how it is possible
to set the double Number1 to have the value of "Numb".
I am not really sure I have understand how the mapping works here.

std::map<std::string, double> numb;

void Test()
{
     double Number1 = 0;
     numb["Numb"] = 10.1;


     //How is it possible to set Number1 to have the value of "Numb"
}
1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Jennifer84
0

I did it like this and it seems to work.

double Number1 = numb["Numb"];
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.