In my program, I implement a list of classes using STL list. However, if I try calling a method of a class that the iterator points to, the compiler gives me the error "request for member of non-aggregate type before ')' token". What is wrong? The code is approximately like this:
Code:list<class class_name*> lst list<class class_name*>::iterator it; it = lst.begin(); it->function();