Why is it better to use \'!=\" than \'<\' in a vector loop? I just can\'t see the difference.
In general, I like to put code like this in a template function similar to the STL algorigthms, such that they are agnostic about what the underlying containter is.
Since < only makes sense for vectors, it would be a poor fit for a generic function. If you use <, you are locking yourself into using a vector.