hey,
Is it a must to store file names in argv so that you can view them? Or the program does it automatically even when file names are stored in another variable?
hey,
Is it a must to store file names in argv so that you can view them? Or the program does it automatically even when file names are stored in another variable?
You can use some other name instead of argv, but generally it is better to stick to convention.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
Nope. Opening files has nothing to do with passing an argument to main.
So that you can pass arguments to the program from the command line, but the arguments don't have to be file names.So why is this command line argument useful?
Just keep learning the language and you'll come to understand this.
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss