problem with chars
| theChameleon (12) | |||
args only gets the last result, or tempChar. is there a way to assign all the different words into each args? thanks. | |||
| bnbertha (404) | |||
| Have you allocated memory for each of the arg arrays? It looks like all the args in the code above point to tempchar so they will all be the same. Try this (I haven't tried compiling it).
Note strdup is like malloc so each arg needs to be free'd | |||
| theChameleon (12) | |||
| thanks a million, man. that helped! yeah, i figured that they are pointing at the same location... just din know what to do to take care of that. | |||
This topic is archived - New replies not allowed.
