I'm writing a library function that takes a list (or "bunch") of items (let's say
Student) and does something with them. What's the best way to write the function signature in the interface?
std::vector<Student>The problem with the is that maybe my caller isn't using STL and then they need to instantiate and populate a vector. Not clean and performance suffers.
numOfStudentsdoesn't seem right, this isn't C.
- A function taking a begin and end iterator? Should it then be implemented as a template function?