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
Declare functions in a header
//MyFunctions.h
int myFunction1(int,int);
int myFunction2(int,int);
Implement them in MyFunctions.cpp
//MyFunctions.cpp
#include "MyFunctions.h"
int myFunction1(int a, int b){
//your code
}
int myFunction2(int a, int b){
//your code
}
Include the header in whatever file you want
//OtherFile.cpp
#include "MyFunctions.h"
//Now you have access to the functions defined in MyFunctions.h in this file
I dont know miniGW but it should look something like g++ otherfile.cpp MyFunctions.cpp ...