Hi Everyone,
I have two questions ;)
1. I want to limit the precsion of the values to say 2 decimal points before I store the values in some container (vector). That is, say, if the value is 0.567899, I want to store 0.57. How do I do that ?
2. I have a map such that,
map<pair<int, int>, vector<double> >
In the vector<double> I always have two values (ie, vector has 2 elements).
such above.
Now, for first key value of 10 in the pair, I want to find the highest value of of the second pair value that makes the value of first vector element zero.
That is, 14 in this example for the following entry.
map[pair(10, 14)][0] = .00;
1. I just wrote a short function for this purpose: http://www.cplusplus.com/forum/general/4011/
2. I'm not sure I understood you correctly. You mean you want to find the highest value for map[pair(10,0..n-1)][1] that also map[pair(10,0..n-1)][0]==0?