5.2

来源:互联网 发布:万花成男捏脸数据 编辑:程序博客网 时间:2024/05/21 16:54

5.4

 while (string::iterator iter != s.end()) { /* . . . */ } 改正:std::string::iterator iter = s.begin();while (iter != s.end()) { /* . . . */ }
while (bool status = find(word)) { /* . . . / } if (!status) { / . . . */ }status是while语句的局部变量,if无法访问改正:while (bool status = find(word)) {     /* ... */     if (!status) { /* ... */ }}
0 0