VS17中字面值字符串问题

引言 之前在windows中写const的总结, 在vs17中测试代码, 结果在测试字符串面值时出现了意料之外的错误. 问题 char *str = "vs2017"; 这行代码在gcc中能够通过编译, 只是有一个警告 : warning: ISO C++ forbids converting a string constant to char* [-Wwrite-strings] 但是在vs中却
相关文章
相关标签/搜索