main()

what does this means...?

int main( int argc, char* args[] )

Why do some people add those parameters there?
I know you are declaring an integer argc, and an array (args[]) pointer of type char.

But where can I use it??

Last edited on
let us say that output of your compilation is executable file a.exe, then when in your command line, if you type
C:> a arg1 arg2 arg3

then argc will contain the number of arguments and args[] will the array which contains those arguments in string format.
Topic archived. No new replies allowed.