Copy results of strtok to 2 strings in C
Posted
by Mr. Man
on Stack Overflow
See other posts from Stack Overflow
or by Mr. Man
Published on 2010-03-26T13:40:20Z
Indexed on
2010/03/26
13:43 UTC
Read the original article
Hit count: 425
Ok, so I have the code
char *token; char *delimiter = " "; token = strtok(command, delimiter); strcpy(command, token); token = strtok(NULL, delimiter); strcpy(arguments, token);
and it gives me EXC_BAD_ACCESS when i run it, and yes, command and arguments are already defined.
© Stack Overflow or respective owner