Hi everyone, i'm having trouble with this program
When i complied, it has an error :error: expected primary-expression before 'char'
char *p=stringsplit(char msg[]);
What should i do to solve this error
Thank you very much
Here is my coe
char *stringsplit(char msg[])
{
char *words[10];
char * p;
int i = 0;
char dauphay[] = ",";
p = strtok(msg, dauphay);
while(p && i < 10)
{
words[i] = p;
p = strtok(NULL, dauphay);
++i;
}
return *words;
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
char msg[]="1,2,3,4";
char *p=stringsplit(char msg[]);
}
void loop() {
// put your main code here, to run repeatedly:
}