本文共 117 字,大约阅读时间需要 1 分钟。
假设string对象str的长度为4 那么不可以操作str[4]是越界的,与char *str不同 str[4]的值是'\0'
转载于:https://www.cnblogs.com/Liu269393/p/10220870.html