I am trying to declare a callback routine in C++ as follows:
void register_rename (int (*function) (const char *current, const char *new));
/*------------------------------------------------------------*/
/* WHEN: The callback is called once each time a file is received and
* accepted. (Renames the temporary file to its permanent name)
* WHAT: Renames a file from the given current name to the specified new name.
*/
However, I get the following error:
line 204: error #70:
incomplete type is not allowed
void register_rename (int (*function) (const char *current, const char *new));
I'm not sure how to correct this. I have other similar callback routines declared in the same header file, and I do not get this error.
Please help! :)