ich habe 3 ZeigerC strtok, Split String in zwei Teile ersten Raum mit
char line[MAX_STR];
char *inputCmd,*inputArgs;
und ich bin mit
inputCmd = strtok(line," ");
Ich frage mich, wie ich es aufspalten, um nur zwei Teile In Beispiel
line = {"COMMAND A PARAMTER TO CHECK..."};
ich möchte die inputCmd auf "Befehl" Punkt und inputArgs zeigen auf "A PARAMTER TO CHECK ..."
Vielen Dank. I
'inputCmd = Zeile; if (inputArgs = strchr (line, '')) * inputArgs ++ = 0; '. BTW 'line' ist kein Zeiger. – BLUEPIXY
oder 'inputCmd = strtok (line," "); inputArgs = strtok (NULL, "\ n"); ' – BLUEPIXY