I get the error on trying to access the iterator reference:
QSet<UniqueWord>::iterator iter = uniqueWords.find(word);
iter->addOccurrence(position); // this gets an error
error: C2662: ‘UniqueWord::addOccurrence’ : cannot convert ‘this’ pointer from ‘const UniqueWord’ to ‘UniqueWord &’
Conversion loses qualifiers
What does the “this” pointer has to do with anything? What am I missing?
↧