#include
#include
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
char ch;
int cont = 0;
cout << "请输入: ";
cin.get(ch);
while (cin.fail() == false)
{
cout << ch;
++cont;
cin.get(ch);
}
//Dos 窗口Ctrl+z加回车会显示输出数字
cout << endl<< "共 " << cont << " 个输入字符";
clock_t tim = 10*CLOCKS_PER_SEC;
clock_t start = clock();
while (clock()-start< tim)
;
cout << "done\a\n";
return 0;
}