Hi everyone.
I'm really running into a wall here. I must be missing something trivial. Here's my faulty code:Whenever I run it I'm getting a bus error. What am I doing wrong here? Also, it would be optimal if I could make an array of strings with a maximum string length of 128 characters and a maximum number of strings of 8. How can I achieve this?Code:char **argvNew;
char *token;
token = strtok (cmd, " ");
while (token != NULL) { // Copy the arguments into argvNew with the exception of the 0th element
argvNew[i] = token;
token = strtok (NULL, " ");
i++;
}
Thanks!