U
Universe
Hello, everyone.
I found the same class declaration can be used more than once in the
same namespace.
For example, there is a C++ file which contains:
class A;
class A;
This can be compiled with no errors. I have tested in g++ with Mingw
and VC 2008. As redefinition is illegal in C++, could someone tell me
why re-declaration is legal?
I found the same class declaration can be used more than once in the
same namespace.
For example, there is a C++ file which contains:
class A;
class A;
This can be compiled with no errors. I have tested in g++ with Mingw
and VC 2008. As redefinition is illegal in C++, could someone tell me
why re-declaration is legal?