-
September 12th, 2013, 05:16 AM
#1
Reading from a map using indexing.
Hello,
I would like to validate one of my approach.
I am creating a map like
std::map<unsigned int, double> key_value_pair;
I insert the value like as follows
1 25.0
0 30.0
5 90.0
2 22.0
Then i would like to read the value like as follows
double value = key_value_pair[0];
I am able to compile & there is no error.
question is does this will give 30.0 always.?
I am using VS2005.
Please help.
-Dave
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|