In the code below, I get an error in the header for the string
while((*(It2 + code)).exists){
void locatetohashtable(std::list<Element> elist, int *m,std::list<Element>& table, std::list<std::string>& keylist ) { std::list<Element>::iterator It2=table.begin(); int i=0; int k=0; std::list<Element>::iterator It; for(It = elist.begin(); It != elist.end(); ++It) { int code=hash_func(stringIntValue((*It).name),*m,i); while((*(It2 + code)).exists){ i++; } table.insert(*(It2+i), (*It)); keylist.insert(keylist.begin(),(*It).name); k++; } }
I do not get the same error for ++It
What is the problem?
source share