How can I read what arguments what passed to my proggie? In Java, it's public static void main(String[] args), so is it int main(char *args) in C++?
Printable View
How can I read what arguments what passed to my proggie? In Java, it's public static void main(String[] args), so is it int main(char *args) in C++?
argcCode:int main(int argc, char* argv[])
{
program-statements
}
An integer specifying how many arguments are passed to the program from the command line. Because the program name is considered an argument, argc is at least 1.
argv[x] contains argument.
Cool, thanks. :cool:
In the standard, argv[argc] is defined to be NULL :)