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"
}

I did it like this and it seems to work.

double Number1 = numb["Numb"];
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.