I need to know how to convert any #define for .c (source) and .h (header) files.
#define ELAPSED_TIME(currentTime, startTime) (currentTime - startTime)
Preprocessed macros are simply text replacement , so if you convert such macro in function then you must bind it with some type , here looking at macro definition I am not sure generic (void*) type will work here. In c++ you can templatise the same, but this is simply replacement so if you have genric usage like for float/char/int/uint/long so better to keep it or templatize it in c++ or use (void*) in c function and do the subtraction on lowest unit level (eg char by char ).
return, and a semicolon. (That particular macro is broken, by the way.ELAPSED_TIME(3, 1+1);should be 1, but is 3.)