char * temp_array;
strcpy(temp_array, argv[i + 1]);
for(int j = 0; j < 8; j++)
{
fann_input[j] = atoi(temp_array[j]);
printf("%f\n", fann_input[j]);
printf("o%c\n", temp_array[j]);
}
fann_input is a float array.
on the atoi line, I get the error:
src/main.cpp: In function ‘int main(int, const char**)’:
src/main.cpp:117: error: invalid conversion from ‘char’ to ‘const char*’
src/main.cpp:117: error: initializing argument 1 of ‘int atoi(const char*)’
Any ideas?
each of the characters is either a 1 or a 0