C++判断输入结束

其实特别简单,不用什么EOF的,只要这样就行了~

while(cin >> a)
{
    cout << a;
}
嗯,就是这样,对于文件流也一样

猜你喜欢

转载自blog.csdn.net/da_kao_la/article/details/80274118