this is an unusual error, but maybe if the code presented here it's easier to recognize?!
void sLetter(Word_store& s)
{
for ((s.words_input)::iterator it = (s.words_input).begin();
it != (s.words_input).end(); ++it)
tolower(*it);
(s.sWords).push_back(s.words_input);
return;
}
the function is aim to converting each character in a string from a member of Word_store into lowercase letter.
struct Word_store
{
std::string words_input;
std::vector<std::string> Words, CWords, sWords;
};
above code is obvious, but the question is why this error occured?
error: expected ';' before '::' token.
error: 'it' was not declared in this scope.