T
Tony Johansson
Hello!
I'm reading a book about C++ and there is something that I don't understand
so I ask you.
It says
"A namespace can contain only the declaration of a member. The corresponding
definitions may be provided outside the namespace; Isn't this wrongit says A
namespace can contain only the declaration of a member. I have definitions
of classes in the namespace even with methods defined and it works.
For example:"
namespace Company
{ class Employee; //class declaration }
class Company::Employee
{
.....
};
//Tony
I'm reading a book about C++ and there is something that I don't understand
so I ask you.
It says
"A namespace can contain only the declaration of a member. The corresponding
definitions may be provided outside the namespace; Isn't this wrongit says A
namespace can contain only the declaration of a member. I have definitions
of classes in the namespace even with methods defined and it works.
For example:"
namespace Company
{ class Employee; //class declaration }
class Company::Employee
{
.....
};
//Tony