I am trying to learn function overloading and not sure why this does not work .
The code snippet is the only real code in setup, I have commented out most of the other function calls.
I am using two overloaded functions
Here are the definitions
bool DebugPrintNew ( char * Print, char* Value )
bool DebugPrintNew ( char * Print, int Value )
AS soon as the the function with overloaded parameters char * Print, int Value gets coded
the program stops. And it does not have to be used to cause this behavior.
Both functions work as expected when coded separately.
Personally I do not see any advantage using overloaded functions as far as memory saving and have no problem having functions with different names.
[b]But for learning purpose I sure would like to know what is going on. [/b]
#ifdef DEBUG_SERIAL
Serial.println("test DEBUG_SERIAL");
char *Print = "Test Print ";
char *Value = "Test Value ";
DebugPrintNew(Print,Value); // passing char* s
/*
STOP
int iValue = 12345;
DebugPrintNew( Print,iValue); // passing char* and iValue
STOP
*/
for(;;);
#endif
return;
{