I tried looking this up and got mixed results using header files and such.
Basically I have multiple cpp files with all my functions I made for use with binary trees, B
The easiest way to do this is to use a build tool. My personal preference is meson build, but CMake is more popular. There are others, but you can't go wrong with either of these. Both of these are cross-platform and support different toolchains. This means that as long as your code is standard C++ you can compile it just as easily using MinGW, Visual Studio, G++, or Clang without changing anything. They let you choose from the available toolchains on your platform. Each has a quick start tutorial on its web site.
The configuration file, which you write, specifies what program source files to use and what executables to build. The build chain that you use is selected in the configuration step and after that you can build your executables by running make or ninja (required by meson, recommended for CMake). If you change your source you only need to rerun make or ninja. Of course only the changed parts are rebuilt. Only the executables that are affected by your changes are re-linked as well.
It may be educational to watch a few verbose builds to get familiar with the build process on your system.
ps Traditionally, in #includes you use angle brackets (<>) for system headers and quotes ("") for your own. It has to do with where to look for them first.
Mike