How to call on a function found on another file?

You can use header files. Good practice. You can create a file called player.h declare all functions that are need by other cpp files in that header file and include it when needed. player.h player.cpp main.cpp Not such a good practice but works for small projects. declare your function in main.cpp