Porting C Code to C++ code. This C Code was written some 20 years back for Solaris.
CHAR *(*MallocPtr)(); //Declared Globally
//inside function
if (!(PTablePtr = (PType *)(*MallocPtr)(sizeof(PType) + (numCharacters * sizeof(CharInfo)))))
return PCODE;
In the above declaration this MallocPtr is not accepting any params. But its calling with params. Function declaration and all was using K&R not ANSI C. This code is compiling successfully in solaris from the beginning.. Am trying to port to CPP using visual studio. I know it looks absurd. but am really clueless whats going on. This is one such example. But there were many more functions in similar way like declaration will not have params but when calling its called with arguements. Functions are defined with params only. Function without param is not defined anywhere in code.