aboutsummaryrefslogtreecommitdiff
path: root/fiforead.cpp
blob: 6da0ae1ff92428895642af4f4d385a05c2df5d26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <iostream>
#include <fstream>
#include <cassert>

using namespace std;

int main(int argc,char **argv){
	if(argc!=2){
		cerr<<"Pass fifo name as argument."<<endl;
		return 1;
	}
	ifstream fifo(argv[1]);
	assert(fifo.good());
	while(!!fifo)cout<<(char)fifo.get()<<flush;
	return 0;
}