When trying to use the execve command, I receive an error about my last 2 arguments.
#include <unistd.h>
const char * c = enviorment.c_str();
execve(full.c_str() , cl.getArgVector(), c);
I've tried using the several different options in copying strings such as:
char *temp2 = new char[(path).size()+1];
strcpy ( temp2, cl.getCommand());
execve(full.c_str() , cl.getArgVector(), temp);
but I'm unable to get it to work and recieve an error message:
error: cannot convert char* to char* const* for argument 3 to int execve(const char*, char* const*, char* const*)