J
John Smith
What's wrong with the use of atoi in the following code? Why do I
get the error message:
'atoi' : cannot convert parameter 1 from 'char' to 'const char *'
char cBuffer[9];
void PushUnique(int);
for(y = 0; y < 9; y++)
{
isF.getline(cBuffer,9);
for(x = 0; x < 9; x++)
bd.Cell[x][y].PushUnique(atoi(cBuffer[x]));
}
get the error message:
'atoi' : cannot convert parameter 1 from 'char' to 'const char *'
char cBuffer[9];
void PushUnique(int);
for(y = 0; y < 9; y++)
{
isF.getline(cBuffer,9);
for(x = 0; x < 9; x++)
bd.Cell[x][y].PushUnique(atoi(cBuffer[x]));
}