Why can't I declare char? [SOLVED]
I am using STM32 Cube IDE with NUCLEO-L4P5ZG
below is my code
void function (int dir, int runtime){
int Run=1;
int bytes_per_reading_gyro = 72;
int bytes_per_reading_echo = 29;
char gyro_reading[bytes_per_reading_gyro];;
int echo_reading[bytes_per_reading_echo];
[more code below]
}
I want both gyro_reading and echo_reading to be char[], but I get the error 'gyro_reading' undeclared (first use in this function) when I try to declare it as char.
int foo[foo_len]; is fine
char foo[foo_len]; gives 'foo' undeclared (first use in this function)
char foo = 'f'; gives 'foo' undeclared (first use in this function)
char foo[foo_len] = {'\0'}; gives expected expression before '{' token
Is there a way I can declare and use char arrays?
[SOLVED edit] I had used #define char somewhere else in the code
