I don't want you to add the type and compile it. I want you to do it in your head or on paper or in a scratch text file to understand what is happening.
Also, it would help to know which line the problem is exactly. We'll try this line:
Code:
while( *it != mynewList->GetList()->end())
mynewList->GetList() returns a medList * and calling end() on that will return a list<_medContainer>::iterator (ignore const for the moment). So the expressions is:
Code:
*it != list<_medContainer>::iterator
Now, it is a medList::iterator * and so changing out medList for list<_medContainer> you get:
Code:
*(list<_medContainer>::iterator *) != list<_medContainer>::iterator
You're dereferencing a pointer, so the list<_medContainer>::iterator * becomes just a list<_medContainer>::iterator giving you:
Code:
list<_medContainer>::iterator != list<_medContainer>::iterator
You're comparing two objects of type list<_medContainer>::iterator, so you're fine. That line is probably not the problem. If you understand what I just did, do it for the Results->push_back(&(**it)); code and see what type you are sending to push_back.