So I have a program that looks something like this:
const char *Argv[] = {"stuff", "stuff1", "stuff3"};
bool pass = xxxxx::yyyyy(Argv.begin(), Argv.end(), Tri);
I think this is illegal because const char * is not a user-defined type. However, I am not sure how to fix this. Would I need to change the first line or the second? Or both?
Argvis an array (ofconst char*s), and yes you can't callbegin()andend()as your code showed, array doesn't have such member functions. Instead, you can usestd::beginandstd::endfor it.If you use other standard containers like
std::vectororstd::arrayinstead, then you can call the member functionsbegin()andend()on them. Note that even for these containers you can still usestd::beginandstd::endon them, which have the same effect as calling their member functionbegin()andend().