标签:iostream 自考 system last names bsp span 超过 ima
源程序:
#include<iostream>
using namespace std;
int main()
{
char buf[10];
int i = 0;
while (cin.getline(buf, 10)) //若输入流的一行超过9个字符,则会出错
cout << ++i << ":" << buf << endl;
cout << "last:" << buf << endl;
system("pause");
return 0;
}
运行结果:
标签:iostream 自考 system last names bsp span 超过 ima
原文地址:https://www.cnblogs.com/duanqibo/p/12236083.html