Multi-level namespace?

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#?
 
D

David Wilkinson

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
{
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top