17 }; 18
19
20 int main(int argc,char *argv[])
21 { 22
23 double Size;
24 double Data;
25 vector<double> X;
26 multiplier R(1.5);
27 sleep(15);
28 fstream IPipe("/tmp/channel.1»);
29 ofstream OPipe("/tmp/channel.2»,ios::app);
30 if(IPipe.is_open()){
31 IPipe » Size;
32 }
33 else{
34 exit(l);
35 }
36 cout « «Количество элементов " << Size << endl;
37 for(int N = 0;N < Size;N++)
38 {
39 IPipe » Data;
40 X.push_back(Data);
41 }
42 OPipe « X.size() « endl;
43 ostream_iterator<double> Optr(OPipe,"\n»);
44 transform(X.begin(),X.end(),Optr,R);
45 OPipe << flush;
46 OPipe.close();
47 IPipe.close();
48 return(0); 49