Is is possible to separate long testApp.cpp files into many?

So I’ve been coding for some time now and lately my testApp.cpp has been getting very long and repetitive. There are some functions I use always that just add clutter and I had never asked myself how to clean it up.
So, is is possible to separate long testApp.cpp files into many files?
How do you guys add functions that you usually use?

Of course, I have functions that call on variables in the testapp.h and .cpp and that is the part that confuses me.
Any info or tutoriales would be great. Thank you!

i am looking in to my files to find some examples for you.

the first one i found was about singletons which allows you to have global variables that can be accessed by all classes; i.e. all .cpp files.

here an example to your original question:

Thanks stephanschulz!
I have never heard of singletons. Are there any other usefull concepts you think I should look into?.

Checking your second example.
But I’d need to call a method of testApp.h from one_class.cpp in my case.

… sorry If I’m missing the point.

Both examples worked for me in CodeBlocks.
Thanks stephanschulz, I’ll apply them in this thing I’m doing now.