Gary Wessle wrote:
> Gary Wessle <> writes:
>
>
>>>Hi
>>
>>I have a method with some static double variables, if I make a
>>map<string,double> instead, will it do the same thing? apart from
>>assigning and accessing the values.
>>
>>thank you
>
>
> do I need to make the values themselves static or no need.
> i.e
> static map<string,int> m;
> static int a = 5;
> m["a"] = 5;
>
> or just
> int a = 5;
> will do?
You only need to make the map static, because the map is static any
values inside the map will also be static (in effect).
john
|