This attempt to define a function overloaded for three sizes of integers fails. Why?
byte hack(byte x)
{
return x+1;
}
unsigned short hack(unsigned short x)
{
return x+2;
}
unsigned int hack(unsigned int x)
{
return x+3;
}
The compiler tells me:
zzz.cpp:98: error: redefinition of ‘unsigned int hack(unsigned int)’
zzz.cpp:88: error: ‘byte hack(byte)’ previously defined here
Your compiler/code thinks that byte and unsigned int are the same thing…