I have a function that must be used by a set of classes; these classes are not related by inheritance. What would be the best way to make this function accessible to all my classes?
Yes. Function definition in a single cpp file, a header file containing the prototype. Every file that uses the function has the header included at the top, and the cpp file is compiled and linked as normal, like all the other cpp files.