Dividing sketch (classes)

Actually we are talking straight C here. This applies to every known C compiler on the planet and is not at all unique to Arduino.

Just because you have source code in another tab (i.e file), you have nothing that tells the compiler that it should also attempt to compile code found in those other files. This is a key ingredient. Without this, the compiler will never be aware of any other files.

Let's say you named your file "myclass.h" or whatever. You need the following line of code at the top of your main source file:

#include "myclass.h"

That will tell the compiler it should also attempt to compile code found there. The compiler will compile each file into an .obj (object file). There is a final step that will link each of the .obj files into a single binary file which will then get loaded to your Arduino. You don't have to worry about that step as the Arduino IDE does that for you. But you HAVE to tell the compiler about the other files. I recommend you do some review on how to break up C code into separate files. Look at some other code and study how they include the ".c", ".cpp", and ".h" files.