Code:
struct OneWord{
std::string be1;
std::string be2;
};
std::vector<OneWord> words;
std::vector<OneWord>::iterator the_iterator;
And somewhere:
Code:
if(*the_iterator.be1==name){
return *the_iterator.be1.c_str();
}
Errors:
Code:
error: 'class __gnu_cxx::__normal_iterator<OneWord*, std::vector<OneWord, std::allocator<OneWord> > >' has no member named 'be1'
error: 'class __gnu_cxx::__normal_iterator<OneWord*, std::vector<OneWord, std::allocator<OneWord> > >' has no member named 'be1'
And the errors refer to these lines:
Code:
if(*the_iterator.be1==name){
return *the_iterator.be1.c_str();