So I have a program called prog.exe that starts with
int main(int argc, char** argv)
The parameters that I pass to it are
prog.exe news-rec
or
prog.exe news-rec -t -p
How could I configure the values of these parameters in code so that I dont have to run the program from command line.
For example for
prog.exe news-rec
I think argc = 1 but how will I configure argv what will it be?
I tried doing
argv[0] = "news-rec";
but that doesn’t work
Because
argv[0]contains the name of the executable itself. Try