I have some C+ arrays that I have built as follows:
std:array<const char *, 4) test1 = {abc.c_str(), def.c_str(), ghi.c_str()}; where abc, def, ghi are std::string
I have to pass this array to another function which has the following prototype: (int argc, char * argv[])
How should I modify array so that give non-const char* ot me that can be passed to above function. Or should I modify the function to const char*. I am not sure if the function tries to modify char* somewhere since this function code is not mine and not available as well currently.
But, in any case it would be good to ask how would I pass non-const char* array to the above function?