Hello Harbour!
I'm trying to write some c wrappers for harbour VM and attempting to use function overloading.
In C++, you can achieve function overloading by declaring multiple functions with the same name but different parameter lists.
However, when compiling my .prg that includes c code inside #pragma BEGINDUMP, Harbour reports declaration syntax error when I try to implement function overloading. Here is some sample code:
HB_BOOL OCRWait(long JobNo, TOCRJOBINFO2 JobInfo2);
BH_BOOL OCRWait(long JobNo, TOCRJOBINFO_EG JobInfoEg);
On these two lines the compiler errors:
Type mismatch in redeclaration of OCRWait
Earlier declaration of 'OCRWait'
Also, why can't I just declare these c functions as "bool" if I'm only calling them from inside other c++ code and not directly from Harbour code?
Can someone here help?
Thank you.