Such a conversion would allow you to put a const char*
into your array of char*
, which would be unsafe. In print
you could do:
thing[0] = "abc";
Now argv[0]
would point to a string literal that cannot be modified, while main
expects it to be non-const (char*
). So for type safety this conversion is not allowed.