error: 'cit' was not declared in this scope
Andrew Haley
aph@redhat.com
Wed Dec 30 13:51:00 GMT 2009
On 12/30/2009 03:38 AM, Gerry Sweeney wrote:
> Thats perfect and solved my problem, thank you very much. I now have
> a better understanding of what the compiler is expecting. The
> compiler could certinaly do with a more explicit error message in
> this scenario, perhaps something like:-
>
> test.cpp:30: error: The item base_type::const_iterator is not known as a type
> certainly would have helped
Sure, but gcc doesn't tell you that because gcc doesn't know because
the grammar is ambiguous. This is really a bug in the language: its
grammar isn't context-free.
Andrew.
More information about the Gcc-help
mailing list