Hey,
I just discovered a very interesting phenomenon.
I have 2 programs.
m.cpp
#include <iostream>
#include<time.h>
using namespace std;
int main()
{
int a=34,b=40;
while(1)
{
usleep(400000);
cout<<a<<" "<<b<<"\n";
}
}
and
n.cpp
#include<iostream>
#include<stdlib.h>
using namespace std;
int main()
{
int a,b;
while(1)
{
cin>>a>>b;
cout<<a<<b;
}
}
Now ,when I do ./m | ./n
nothing is printed
Can anyone please explain why?