Review the types of the various objects in your program. In the above, both myList and item are both pointers to a list of unsigned shorts. Since myList is expecting an object of
unsigned short
, trying to use it with an object of
std::list<unsigned short>*
is never going to work. What is the type of
Type.getValue()
? It should be
unsigned short
, in which case the following should work:
Type* temp = m_head;
std::list<unsigned short>* myList = new std::list<unsigned short>;
while(condition)
{
myList->push_back(temp->get_value());
}