There is a theme - Separating class code into a header and cpp file
It describes how to separate a class with variables and methods to .h and .cpp
But it's a simple one.
Say I have this in main.cpp
int main() {
    class Filth {
        int a, b;
        void pra() { std::cout << a; }
        class Frank {
            int sacrifices;
            void praisChinChin() { std::cout << "DARK LORD IS COMMINGGGGGG"; }
        }
    };
}
And how do I write THIS class (Filth) into a .h and .cpp so I dont get "undefined reference" and any other mistake?
And how exactly does it work (why I should write this exact code, what exactly does it do to my program)?
 
     
    