Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 300 Bytes

File metadata and controls

20 lines (13 loc) · 300 Bytes

a

迭代器iter使用前未初始化

string::iterator iter = s.begin();
while (iter != s.end()) { /*...*/}

b

bool变量status仅能在while的块中使用,要在块外使用的不能在while块中定义

bool status = find(word);

while (status){;}
if (!status){;}