When I try to compile this I get this error:
error: expected `;' before 'it'
Why I can't declare this iterator? Where is the problem?
#include <list>
template <typename Z>
class LBFuncBase: public LBBaseBlock<Z>
{
void Something() {
std::list<LBBaseBlock< Z >* >::iterator it;
}
};
Try:
typename std::list<LBBaseBlock< Z >* >::iterator it;
Edit:
See "Why do you sometimes need to write typename" for an explanation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With