D
Divick
Hi all,
does any one know what is the right way to forward declare
classes within namespaces. Though I have been using the syntax as
follows but it doesn't sound good to me.
namespace myVeryOwnNamespace
{
class myClass1;
}
class X
{
public:
myClass1 * _mClass;
};
Ideally I wish if C++ allowed forward declaring classes like
myVeryOwnNamespace::myClass1, but it seems to me this syntax is not
allowed.
I really wish that if C++ designers designed namespaces in much the
same way as Java handles the packages.
I find that not many people use the namespace feature of C++ even
though it is such a strong feature. If any one of you has programmed in
Java, then you would know that most of the libraries/products on this
planet take use of the feature provided by the packages. But this is
not the case with C++. Does any one have explanation for this i.e. why
at all C++ namespaces not used as extensively as Java packages?
Thanks,
Divick
does any one know what is the right way to forward declare
classes within namespaces. Though I have been using the syntax as
follows but it doesn't sound good to me.
namespace myVeryOwnNamespace
{
class myClass1;
}
class X
{
public:
myClass1 * _mClass;
};
Ideally I wish if C++ allowed forward declaring classes like
myVeryOwnNamespace::myClass1, but it seems to me this syntax is not
allowed.
I really wish that if C++ designers designed namespaces in much the
same way as Java handles the packages.
I find that not many people use the namespace feature of C++ even
though it is such a strong feature. If any one of you has programmed in
Java, then you would know that most of the libraries/products on this
planet take use of the feature provided by the packages. But this is
not the case with C++. Does any one have explanation for this i.e. why
at all C++ namespaces not used as extensively as Java packages?
Thanks,
Divick