Quote Originally Posted by wysota View Post
Jacek already gave you two good hints.

I'd like to note one thing, Mickey. I have noticed some time ago that you desperately try to use existing STL calls or "STL-ize" your code when there is no need of doing it or when the STL call does something similar (as opposed to "the same") to what you want. Placing STL calls everywhere can easily make your code unreadable or can even break it if you happen to use a faulty STL implementation (remember that only the API is the standard, not the internal implementation of the library). Simple solutions are usually the best and there is no benefit from spending hours trying to wrap the functionality you want to obtain into an STL (or place another of ones favourite library name here, Qt included) call.
It's not clear;
Are you saying to don't use std:max_element? (and write it by myself)
I can simply put into a namespace a function double computeMax() { }, but for my application the datas are in vector<Value> and I think that I'll have to pass this vector to computeMax()
so I'll have computeMax(vector<Value>& vec) { }, BUT in this way I have a function that is coupled with that vector.......
Probabibly I don't understand....