The "combination" is defined as char combination[6]. When newCombination is called, I want the parameter c string (combo) to be set to the combination variable, if the entire combo string is numeric.
I'm getting the error:
Can't convert char[] to char[6].
What does this mean??
---
Also what do you think of my looping logic for checking to ensure the whole "combo" is numeric? Is it alright?
Much appreciated as always =)
Code:
void newCombination(char combo[])
{
//int intCombo = atoi(combo);
int count = 0;
for(int i = 0; i < 6;i++)
{
if(isdigit(combo[i]))
{
count++;
}
}
if(count == 5)
{
combination = combo;
}
}