Where are C/C++ main function's parameters?

前端 未结 10 1849
清酒与你
清酒与你 2020-11-29 02:31

In C/C++, the main function receives parameters which are of type char*.

int main(int argc, char* argv[]){
  return 0;
}

10条回答
  •  半阙折子戏
    2020-11-29 02:52

    The argument list is part of the process environment, similar to (but distinct from) environment variables.

提交回复
热议问题