struct A {
struct S {
int _M_data;
S* _M_left;
S* _M_right;
};
};
class B
: protected A {
typedef A::S S;void f();
};
void B::f() {
list<S*> list1;
list<S*> list2;
}
the underlined code was what i added in order to B::f() work, but still strange because if i declare just 1 list, i would not need the typedef declaration.
I found the problem, but even, it's still strange, i think it's some kind of name conflict with struct _Node, however it doesn't report as a name conflict., i'm going to post exactly the code that gives an error:
It's likely '_Node' is used by the implementation for something. You should avoid identifiers beginning with underscore, at least for the global namespace.
I fixed that on this post, this was handwritten, on my real code it doesnt have any kind of syntax errors. I compiled exactly this code (already fixed) and it keeps to give the _Node error.