Suppose I want mergesort.cpp that implements mergesort. So in my .cpp file I have something like:
int * mergesort(int * a, int lo, int hi)
{
//mergesort
}
and in the header mergesort.h, I would have:
public static int mergesort(int *, int, int);
Then in another sourcefile, say main.cpp where I included mergesort.h, I would like to call the function mergesort without having to create any instance of an object.
int a [10];
mergesort::mergesort(a,0,9);
Okay, but this doesn't work because I don't know the proper syntax, and I don't really know what terminology to use to ask the question, but hopefully it is clear.