How do I mark the end of a char* vector with ‘\0’ to null-terminate it?
If i have char* vector:
char* param[5];
I thought of either
param[4] = '\0';
or
char c = '\0';
param[4] = &c;
but none of them seem to work?
param is a char-pointer vector, supposed to point to 5 strings(char-vectors).
Ok you are trying to end a vector of strings, something similar to what is passed to
mainasargv. In that case you just need to assign a null pointer: