fig11_15.cpp
来自「经典vc教程的例子程序」· C++ 代码 · 共 19 行
CPP
19 行
// Fig. 11.15: fig11_15.cpp
// Unformatted I/O with read, gcount and write.
#include <iostream.h>
int main()
{
const int SIZE = 80;
char buffer[ SIZE ];
cout << "Enter a sentence:\n";
cin.read( buffer, 20 );
cout << "\nThe sentence entered was:\n";
cout.write( buffer, cin.gcount() );
cout << endl;
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?