Probably a very simple question but I couldn't figure out the reason. All the given code is in the same file.
This is the definition of one of the arrays. It is defined outside of every method.
unsigned char KEY_40_COMPARE_VALUES[] = {
85,102
,119,134
,147,158
,165,169
,169,165
,158,147
,134,119
,102,85
,67,50
,35,22
,11,4
,0,0
,4,11
,22,35
,50,67
};
This is the code:
unsigned char * getCompareValuesForIndex(char index)
{
if (index == 0)
{
return KEY_28_COMPARE_VALUES;
}
if (index == 1)
{
return KEY_30_COMPARE_VALUES;
}
if (index == 2)
{
return KEY_32_COMPARE_VALUES;
}
if (index == 3)
{
return KEY_33_COMPARE_VALUES;
}
if (index == 4)
{
return KEY_35_COMPARE_VALUES;
}
if (index == 5)
{
return KEY_37_COMPARE_VALUES;
}
if (index == 6)
{
return KEY_39_COMPARE_VALUES;
}
else
{
return KEY_40_COMPARE_VALUES;
}
}
This is the compilation error I get:
conflicting types for 'getCompareValuesForIndex'