Search code examples
cargumentsprogram-entry-point

Is there any difference between int main(int argc, char* argv[]) and int main(int argc, char** argv)


Is there any difference between int main(int argc, char* argv[]) and int main(int argc, char** argv) I don't see any difference.
And, which is better to use?


Solution

  • There is no semantic difference between

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

    and

    int main(int argc, char** argv)
    

    . They have identical meaning. I personally prefer the former, as I think it more clearly conveys the significance of the second argument.