amdskip
Lifer
I'm trying to convert a decimal value into the appropriate base. I posted just some of my code here. Base is a char global variable and it holds the value of b, o, h, etc. I'm getting the error message "cannot resolve symbol variable base".
static String decimalToBase(int d)
{
if (base == 'b')
{
String b = "";
while(d > 0)
{
b = "" + (d%2) + b;
d /= 2;
}
return b + 'b';
}
static String decimalToBase(int d)
{
if (base == 'b')
{
String b = "";
while(d > 0)
{
b = "" + (d%2) + b;
d /= 2;
}
return b + 'b';
}