I suspect I don't understand namespaces or something, but does anyone have an idea of why the following code segment which is all in a single *.h file causes a compile error?
namespace first {
namespace first {
namespace second {
namespace third {
} //end second
} // end first
Any help or debug ideas appreciated. Thanks
namespace first {
typedef class _A {
public:
_A() {};
~_A() {};
void set(int c) {b = c;};
int b;
} A;
} //end namespace firstpublic:
_A() {};
~_A() {};
void set(int c) {b = c;};
int b;
} A;
namespace first {
namespace second {
namespace third {
class foo {
public:
foo() {};
~foo() {};
int c;
A m;
m.set(c);
};
} // end thirdpublic:
foo() {};
~foo() {};
int c;
A m;
m.set(c);
};
} //end second
} // end first
Any help or debug ideas appreciated. Thanks
Comment