A lot of Errors, owned by my function fg_bg()
Posted: Wed Aug 17, 2005 2:16 pm
I have made a function:
//Returns the total color value
char fg_bg(char fore, char back); //THIS LINE CAUSES AN ERROR
char fg_bg(char fore, char back)
{
char total;
total=(16*back)+fore;
return total;
};
When I then try to:
char color = 0;
color = fg_bg(0x0f, 0x00) // don't care about these hex arguments
the compiler says:
warning: implicit declaration of function ?fg_bg?
So, What IS the problem??? I'd say that the downer code was right, right?
//Returns the total color value
char fg_bg(char fore, char back); //THIS LINE CAUSES AN ERROR
char fg_bg(char fore, char back)
{
char total;
total=(16*back)+fore;
return total;
};
When I then try to:
char color = 0;
color = fg_bg(0x0f, 0x00) // don't care about these hex arguments
the compiler says:
warning: implicit declaration of function ?fg_bg?
So, What IS the problem??? I'd say that the downer code was right, right?