亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

C++: Enter an article without giving the number of words. Use a cin loop to get each word. How to stop the loop at the end of the article?
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新 2017-07-04 13:45:46
0
2
1457

Enter an article without giving the number of words. Use a cin loop to get each word. How to stop the loop at the end of the article?
For example:
Input: to be or not to be is a question
Code:

string a;
while( ? ) //無法停止循環(huán)
{
    cin >> a;
    // Do some thing...
}
曾經(jīng)蠟筆沒有小新
曾經(jīng)蠟筆沒有小新

reply all(2)
淡淡煙草味
while(cin >> a)
{
    // Do some thing...
}

cin在讀取輸入流的末尾是會設(shè)置標(biāo)記位failbit為false
某草草
if(a == "quit")
    break;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template