cin.getline()
cin.getline(_Elem *_Str, streamsize _Count);
cin.getline(_Elem *_Str, streamsize _Count, _Elem _Delim);使用cin.getline()时,可以传递2个参数,即:存储地址*_Str和读入的数量_Count。在这种情况下如果输入的内容大于_Count,则在最后自动添加结束标志,这样的话,实际读进来的数量
原创
2017-05-20 20:11:31 ·
293 阅读 ·
0 评论