string的用法

二者用法大体一样,区别在于一点:

.c_str()   是生成以‘’结束的字符串;
.data()    生成的字符串没有‘’;
原文地址:https://www.cnblogs.com/Erdos001/p/4769839.html