| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
Re:求助:为什么去掉一个回车,错误会变呢In Reply To:求助:为什么去掉一个回车,错误会变呢 Posted by:winters_coming at 2012-05-22 10:08:30 > #include <iostream>
> #include <string>
> using namespace std;
>
> int main()
> {
> string str;
> int pos;
> while (getline(cin, str), str != "EOF")
> {
> if ((pos = str.find("you")) != EOF)
> str.replace(pos, 3, "we");
> cout << str << endl; // 有回车Output limit,没有就time limit
> }
> return 0;
> }
>
> 这两个错误哪个优先级高啊
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator