is there a way to pass values from command line to the int argc and char* argv arguments of int main()?
Last edited on
I'm not sure I understand. That's the whole point of those parameters. When a program is executed the OS sends console parameters to the entry function, which is main in this case.
"myprogram arg1 arg2"
in this case, argc would be 3, argv would be myprogram, argv would be "arg1" and argv would be "arg2".