⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flushbuf.cpp

📁 C++的常用算法
💻 CPP
字号:
#include <stdio.h>
#include <iostream.h>

/* BUFSIZ is defined in stdio.h */
char outbuf[BUFSIZ];

void main( )
{
	/* attach a buffer to the standard output stream */
	setbuf(stdout, outbuf);

	/* put some characters into the buffer */
	cout << BUFSIZ << endl;

	cout << "This is a test of buffered output." ;
	cout << "This output will go into outbuf" ;
	cout << "and won't appear until the buffer" << endl;
	cout << "fills up or we flush the stream." << endl;

	/* flush the output buffer */
	cout.flush( );
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -