Implicit conversion from char** to const char**

前端 未结 4 1776
终归单人心
终归单人心 2020-11-29 07:50

Why my compiler(GCC) doesnt implicitly cast from char** to const char**?

Thie following code:

#include 

vo         


        
4条回答
  •  天命终不由人
    2020-11-29 08:23

    Because it might allow us to modify a constant value. Read here to understand why: http://c-faq.com/ansi/constmismatch.html

提交回复
热议问题