First question:
how can i pass a vector to a function
Just pass it directly. For example(assume function template):
template <typename T>
void processVector(const vector<T>& vec );
Inside main, you can call it as follows:
processVector<unsigned int> (integers); //an example instantiation
Second question:
if i wanted to overload the << to do all this behind the scenes would that be possible?
Yes, of course possible. see how to overload <<
operator from those resources:
MSDN Overload << operator and
Overload the << operator WISC
and a bunch of resource from SO: How to properly overload << operator