Linked List Help C++

I fixed the problem on this thread
Last edited on
You appear to be in the same class as another user who posted similar code a couple weeks ago. I told him that these functions should not be part of his linked list class but he refused to listen.

Your findoldest_youngest function assumes that the list is a List<person>, but as a template class, the list can be List<anything>. You cannot expect the compiler to let you say that the list can hold any type of data but have its functions only work for one type of data.

TLDR: Move those functions outside of your class.
Topic archived. No new replies allowed.