Say I have a 3-dimensional char array
char strList[CONST_A][CONST_B][CONST_C];
And an array pointer (changed after comments pointed out the error):
char * args[CONST_C];
I want to pick a part of strList and make args to be that value. For example, if strList representing something like
{{"Your", "question", "is", "ready", "to", "publish!"},
{"Our", "automated", "system", "checked", "for", "ways", "to", "improve", "your", "question"},
{"and", "found", "none."}}
and I want args to be
{"and", "found", "none."}
how should I do it?
I've tried to use args = strlist[someIndex]; but got an error saying incompatible types when assigning to type ‘char *[100]’ from type ‘char (*)[100]’ , strcpy also seems to fail (probably due to args was not allocated with enough space?), what should I do to properly assign args?
edit: args has been used prior to the assignment, so changing the type of args, while plausible, does require a lot of extra work on other parts of the code.
char * args[CONST_C];this is not a pointer to array, this is an array of pointers