多组输入,以回车结束的方法

模板 cin输入,以回车结束 while(cin>>a>>b) { scanf("%d",&a[i++] ); if( getchar() == ‘\n’) { break; } }web 字符串多组输入svg string s; while(getline(std::cin,s)&&!s.empty()){ }
相关文章
相关标签/搜索