C++ - char** argv vs. char* argv[]

后端 未结 7 1201
别跟我提以往
别跟我提以往 2020-12-12 12:09

What is the difference between char** argv and char* argv[]? in int main(int argc, char** argv) and int main(int argc, char* arg

7条回答
  •  醉酒成梦
    2020-12-12 12:53

    For all practical purposes, they're the same. This is due to C/C++'s handling of arrays passed as arguments, where an array decays to a pointer.

提交回复
热议问题