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

后端 未结 7 2254
盖世英雄少女心
盖世英雄少女心 2020-12-18 08:52

If I have this:

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

In the body, you can sometimes find programs using argv[1].

When do w

7条回答
  •  旧时难觅i
    2020-12-18 09:23

    as argv[0] is filepath of the program itself. Extra command line parameters are in further indexes, argv[1],argv[2].. You can read more here : http://www.site.uottawa.ca/~lucia/courses/2131-05/labs/Lab3/CommandLineArguments.html

提交回复
热议问题