D
Daqian Yang
Hello all,
can I do this in cpp:
namespace name{
class classname{
//fuctions here...
}
}
thanks.
can I do this in cpp:
namespace name{
class classname{
//fuctions here...
}
}
thanks.
Daqian said:Hello all,
can I do this in cpp:
namespace name{
class classname{
//fuctions here...
}
}
but don't put semicolons after namespaces because it isn't standardGianni said:Yes. You can nest classes within classes and functions and you can nest
namespaces within namespaces.
i.e.
namespace X {
namespace Y {
struct A {
struct B {
void F() {
class C {};
}
};
};
};
};
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.