What does int argc, char *argv[] mean?

前端 未结 8 2140
萌比男神i
萌比男神i 2020-11-21 05:18

In many C++ IDE\'s and compilers, when it generates the main function for you, it looks like this:

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

When I

8条回答
  •  情话喂你
    2020-11-21 05:56

    The first parameter is the number of arguments provided and the second parameter is a list of strings representing those arguments.

提交回复
热议问题