用c++ sttring检测名字是否有空格

name.find(' ') == std::string::npos//npos==-1,表示没找到

 

posted @ 2018-06-28 21:17  confusion  阅读(223)  评论(0)    收藏  举报