I have
char c;
where
int bt_available = Serial2.available();
if (bt_available) {
c = Serial2.read();
}
and later in the code I try to
strcat(some_char_array, c);
and it gives me this error
initializing argument 2 of 'char* strcat(char*, const char*)' [-fpermissive]
error: invalid conversion from 'char' to 'const char*' [-fpermissive]
My best guess why the error appears would be that strcat can only accept strings and char arrays, but not single characters, so a solution I can think of would be to create a char array like char test[1] where test[1] = '\0' and then test[0] = c but I'm not sure if that's the best way to go about the problem and if that's a solution. Does 'const char*' mean 'char[]'?
P.S I read Majenko's blog thingy and I'm turning all Strings to char arrays and it's a bit of suffering :P