i want to find the minimum value of a column in a two dimensional vector..
is there an easy way to do that?
a function that does that easy for example..
Again, it depends on how your 2D vector is set up.
If the inner vectors represent columns, the above will work.
If the inner vectors represent rows, it won't. You'll have to
write something on your own in that case. Don't be lazy :)
Oops, I didn't even notice that you said columns. If each inner vector is a row, then you pretty much have to iterate over each vector yourself. If you want the min_element and such of a single vector, then I would definitely recommend using STL algorithms or member functions where you can. It is generally much less error prone. Just look up vector, valarray, and algorithm on this site to see what is available.