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

📄 testpipe.cpp

📁 test pipeline under linux
💻 CPP
字号:
// testpipe.cpp : 定义控制台应用程序的入口点。
//

#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <fcntl.h>
#include <io.h>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
	for(int i=0;i<argc;i++)
	{
		cerr<<argv[i]<<endl;
	}
	int s_stdin = setmode (fileno(stdin), O_BINARY);
	int s_stdout = setmode (fileno(stdout), O_BINARY);

	ofstream ofs("c:\\o.txt",ios::binary);
	int c ;
	while ((c = getchar ()) + 1) 
	{
		char x = c;
		ofs.put(x);
	}

	/*
	char buf[1024];
	for(;;)
	{
		int c= getchar();
		if(c!=EOF)
		{
			ofs.write(buf,readnum);
		}
		else
		{
			break;
		}
	}
	*/
	return 0;
}

⌨️ 快捷键说明

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