visual-studiovisual-c++namespaces

How do I add a namespace when creating a new c++ class?


I right click in my solution and select add class, then c++ class and enter a name but I need to be able tof define a namespaceace because the object I'm creating has the same name as another object in my project.


Solution

  • Put your class into

    namespace my_name_space {
        class my_class {
        //...
        };
    }
    

    ?