C
Cat
In C#, this is legal
namespace MyNamespace.MyApp
{
class MyClass{}
}
I asked about this, and someone told me that
namespace MyNamespace::MyApp
{
ref class MyClass{};
}
is the correct syntax. But I tried that on Visual C++.NET 2008,
it didn't compile.
error C2653: 'MyNamespace' : is not a class or namespace name
Only the following worked.
namespace MyNamespace
{
namespace MyApp
{
ref class MyClass{};
}
}
but that makes me indent a lot of spaces if I would like to define
a namespace like MyCompany.MyDivision.MyProject.MyModule.
Is it impossible to define nice one line multilevel namespace like in
C#?
namespace MyNamespace.MyApp
{
class MyClass{}
}
I asked about this, and someone told me that
namespace MyNamespace::MyApp
{
ref class MyClass{};
}
is the correct syntax. But I tried that on Visual C++.NET 2008,
it didn't compile.
error C2653: 'MyNamespace' : is not a class or namespace name
Only the following worked.
namespace MyNamespace
{
namespace MyApp
{
ref class MyClass{};
}
}
but that makes me indent a lot of spaces if I would like to define
a namespace like MyCompany.MyDivision.MyProject.MyModule.
Is it impossible to define nice one line multilevel namespace like in
C#?