Hello,
I am writing a script which is using the system() command. In the
script the system command invokes an encryption with system("gpg -f
file.txt").
The problem comes when the script is required to perform this
operation on different files which the user selects via another
function. The name of the filename is stored in a variable as a
string and I can't get the variable substituted into the ststem
command. I have tried to concatenate the whole command inside the
quotes into one string variable and enter it into the system command
but this brings up the error that the system command requires a const
char and not strings. Can anyone help me out with getting this system
command to work.
I have had the thought of looking into tcreating a pointer to the
string and putting this in the command, would this be on the right
track?
any help you can give would be greatly appreciated.
Thanks and regards
John