execv() const-ness
i mostly execv() duty c++ nonetheless arguments c++ strings. annoys me i can't this:
const bake *args[4];
args[0] = "/usr/bin/whatever";
args[1] = filename.c_str();
args[2] = someparameter.c_str();
args[3] = 0;
execv(args[0], args);
this doesn't accumulate since execv() takes char *const argv[] congruous const bake * i have duplicate std::strings impression arrays controlling strdup() pain.
does anyone know reason ?
Comments
Post a Comment