I have a vector named tokens that holds the command in tokens[0] and args as the rest of the vector. I am trying to convert the vector so I can make the call to execvp(args[0], args);
Currently args[0] and args just print as memory addresses.
char **args = (char**)malloc(tokens.size() * sizeof(string));
char *arg;
int i;
for(i = 0; i < tokens.size(); i++)
{
arg = &tokens[i][0];
args[i] = arg;
}