Why assigning a regular pointer to a pointer-to-const is allowed but not the opposite?

前端 未结 0 1682
借酒劲吻你
借酒劲吻你 2021-01-03 17:45

Assigning a regular pointer ptr2 to a pointer-to-const ptr1 like shown in the code below does not produce any warning.

#include 

        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题