gets() //可能会报错 fgets(str,count,stdin); cin.getline(str,count); getline(cin,str);(str为string) string转char[] string.c_str() 返回char指针 strcpy(tmp,str.c_str()); char[]转string string tmp(str); string tmp=str; string tmp;tmp=str; 赞微海报分享
近期评论