I used strsep() in C code, but I got this error.
void get_token()
{
char *token;
char *stringp;
int n = 1;
stringp = buf;
while( stringp != NULL )
{
token = strsep(&stringp, "\t\n");
switch(n) {
case 1 : strcpy(label, token);
case 2 : strcpy(opcode, token);
case 3 : strcpy(operand, token);
} n++;
}
}
This is my code and I using strsep() like this. I don't know the error said int. strsep() return char* I think.