I'm experimenting with embedding C code in C++ as a wrapper in order to call execvp(). I pass two C strings to my C wrapper function. One is a const char* and the other is a char*. For some reason, the const char* passes and replicates the second element in the first when passing to the C function. However, that doesn't happen with the char*. I'm attaching a pastebin link for the code. You will be able to see what is going in better detail there.
Can anyone test this for me and see if you get the same result? I'm using gcc 6.2.1 to compile.