[Solved] How to create a Class inside of a namespace?


classname.h

#include <iostream>

namespace N {
    class classname {
    public:
        void classmethod();
    }
}

classname.cpp

#include "classname.h"

namespace N {
    void classname::classmethod() {
        std::cout << "classmethod" << std::endl;
    }
}

main.cpp

#include "classname.h"

int main() {
    N::classname a;
    classname b; // Error!

    a.classmethod();

    return 0;
}

solved How to create a Class inside of a namespace?