Namespace and class with the same name?

前端 未结 9 1731
终归单人心
终归单人心 2020-11-29 03:38

I\'m organizing a library project and I have a central manager class named Scenegraph and a whole bunch of other classes that live in the Scenegraph namespace.<

9条回答
  •  无人及你
    2020-11-29 04:23

    It happens when it's the main class of the namespace. So it's one motivation to put the namespace in a library, then the issue goes away if you add 'Lib' to the namespace name...

    namespace SocketLib
    {
        class Socket
        {
    

提交回复
热议问题