摘要: 对于string自带的函数 c_str()返回的const char*类型,对于scanf函数不能使用,可以通过如下方法使用 string s; scanf("%s",&*s.begin()) => s.begin() 返回的是一个const char* 常量指针,通过*对其取类容,再通过&地址符得 阅读全文