I have defined an abstract class so I must use reference to that class... I also use a list with that type... the problem is when I intent to use the iterator as an argument to a function.
This is the snap:
When I compile I got:Code:void sustituir(CTermino *&termino) //Dado un termino, le aplica la sustitución y lo entrega modificacdo { Parser parser; if (!(invalida) && !(esSustitucionVacia())) { //Solicito la lista de parametros del termino, para atenderlo en caso de que sea una funcion list<CTermino> * listaParametros = termino->getListaParametros(); list<CTermino>::iterator it = listaParametros->begin(); //Dependiendo del tipo de termino que sea, lo sustituyo switch (!(termino->perteneceVariable(termino) || parser.esConstante(termino->getSimbolo()))) { case false: if ( mapaReemplazos.find(termino->getSimbolo()) != mapaReemplazos.end()) { termino = (mapaReemplazos[termino->getSimbolo()]).second; } break; case true: while (it != listaParametros->end()) { sustituir (*it); it++; } termino->setListaParametros(*listaParametros); break; default: ; } delete listaParametros; } }
error: no matching function for call to 'CSustitucion::sustituir(CTermino&)'
note: candidates are: void CSustitucion::sustituir(CTermino*&)
Is it possible to do what I intent to do? What should I do in order to correct such compile error?
Thanks in advance!!!!!![]()



LinkBack URL
About LinkBacks




