warning: ISO C++ forbids converting a string constant to ‘char*’

 [-Wwrite-strings]char *password = "密码"

注释:

国际标准化组织(International Organization for Standardization)

forbid:禁止

convert:转换

constant:不变的

 warning: ISO C++ forbids converting a string constant to ‘char*‘ [-Wwrite-strings]_"iso c++ forbids converting a string constant to '_酷小川的博客-CSDN博客

 改为:char *password = (char *)"密码"

你可能感兴趣的:(c++,开发语言)