Hey.
Im getting a warning message: passing arg 2 of `strstr' makes pointer from integer without a cast
Im trying to bring in a string "ls -la" for example and to take it to my function....yet it fails to do so using this logic.
Confused about this...Here is the snippet of code:
Cheers...Code:y = array; array2=NULL; while((r=strstr(y,' '))!=NULL) { r[0]='\0'; array2=realloc(array2, sizeof(char**)*(c+1)); array2[c]=y; y=r+1; c++; } printf("%s\n", array);