symbols
is of type pointer to char
. You need an array of pointers to char
.
Change
char* symbols = {"++-", "--+"};
to
char* symbols[] = {"++-", "--+"};
and condition in if
if(strcmp(tmp[i], "+") == 0)
to
if(tmp[i] == '+')