摘要: getline用来读入带空格的字符串 使用方式 getline(cin,st); 注意点: 若scanf或cin与getline一起使用,需要清空scanf或cin的缓冲内容 scanf("%d",&n); char c=getchar(); getline(cin,st); 其中c=getchar 阅读全文
posted @ 2021-07-05 23:03 XA科研 阅读(80) 评论(0) 推荐(0) 编辑