All,
I need to know how do i pass arguments on cmd to a CPP program using int
main(int argc, char * argv[])
Please help me with anything, source code or just an explanation.
Thanks in advance
argv is an array of strings, starting with the name of the application. These are your command line arguments.
Yes, so if you did something like:
C:/> myprog.exe stuff argle
argc == 2 (pretty sure)
argv[0] == "myprog.exe"
argv[1] == "stuff"
argv[2] == "argle"
argc == 3, but otherwise correct.