输入时的判断

char ch;

cin>>ch;

1, while ( cin.get(ch) ) 

2,while( ch != EOF )

3, while( cin.fall() == false )

4, while( (ch = cin.get()) != EOF)

5, while( !cin )

posted @ 2017-09-28 01:43  Bear_Guo  阅读(132)  评论(0编辑  收藏  举报