Help!!! I´m working in a project and when I try to compile I got plenty errors... one of them if error: aggregate 'Parser parser' has incomplete type and cannot be defined.
The code where appears it is:
insert
Code:
class Parser;
#ifndef CFUNCION_H
#define CFUNCION_H
#include "Parser.h"
#include "CTermino.hpp"
//using namespace std;
class CFuncion: public CTermino {
//.... stuff
bool operator==( CTermino *ter2 )
//Sobrecarga del operador "==" que define una relación entre dos términos,
//la relación de IGUALDAD. Informalmente, dos terminos son IGUALES cuando cada uno de los simbolos
//que componen al término los son. Es decir, viéndo los términos como cadenas, las cadenas deberán ser
//exactamente iguales
{
bool ig = true;
Parser parser;
if (!ter2->perteneceVariable(ter2) && !parser.esConstante(ter2)){
//Se que son funciones
//Deberia castear a funcion para poder usar los metodos propios?
list<CTermino> * listTer1 = this->getListaParametros();
list<CTermino> * listTer2 = ter2->getListaParametros();
list<CTermino>::iterator it1 = listTer1->begin();
list<CTermino>::iterator it2 = listTer2->begin();
while ( ((it1 != listTer1->end()) || (it2 != listTer2->end())) && ig)
{
//Si tienen distinta cantidad de parametros, es decir, alguno llego al final antes que el otro
if (((it1 == listTer1->end()) && (it2 != listTer2->end())) ||
((it1 != listTer1->end()) && (it2 == listTer2->end())))
ig = false;
else
ig = (*it1) == (*it2); //que pasa aca?? :S
//Aca estoy pidiendo equivalencia entre el componente de los terminos...
it1++; it2++;
}
delete listTer1;
delete listTer2;
}
else
ig=false;
return ig;
}
Could someone help me??? What is the reason of that error?? What should I do to correct it??
Thanks in advance!!!