How do I output these vectors using this function? I reckon I must use a loop, but I'm unsure how this would affect the output stream. The objective is to be able to use cout<<(Name_pairs object) to print the name pairs.
edit: I figured that I'd need some way to acces the vectors stored, so I added two member functions that return the vectors. However << doesn't accept vectors, so it hasn't helped much.
But I'm supposed to replace that with using << overload.
I see that you store something in os before returning it, would this then perhaps be possible?: