Multi-level namespace?

  • Thread starter Thread starter Cat
  • Start date Start date
C

Cat

In C#, this is legal
namespace MyNamespace.MyApp
{
}

But when I did that in VC++, it didn't compile.
I had to change it to
namespace MyNamespace
{
namespace MyApp
{
}
}

If the level is more than two, it gets really nasty. Why can't I do it
the way I do in C#?
 
Cat said:
In C#, this is legal
namespace MyNamespace.MyApp
{
}

But when I did that in VC++, it didn't compile.
I had to change it to
namespace MyNamespace
{
namespace MyApp
{
}
}

If the level is more than two, it gets really nasty. Why can't I do it
the way I do in C#?

Cat:

Wrong syntax.

namespace MyNamespace::MyApp
{
}
 
Back
Top