Error: "invalid use of non-static member function" while calling a function from my own class-method
The problem is that echo_check isn't void echo_check() but void echo_check(myclass *this) because it's a member function of a class.

You can make the whole thing static (along with run()) by:

class myclass {
    public:
        static void run();
        static void echo_check();
};

static void myclass::run() {
    .... 
}

void myclass::echo_check() {
    ....
}


And then you call:

myclass::run();


instead of instantiating an object.