title: Linux terminal pipe to my C++ program
body: <p>I'm not sure about the terminology, and when I googled this I got many misleading results. I just need a push and I'll be fine.</p>
  
  <p>How can put my program as a target to piping in linux terminal?</p>
  
  <p>Say I wrote a C++ program MyProg</p>
  
  <p>I would like to be able to do something like </p>
  
  <p>$ ls | ./MyProg</p>
  
  <p>Could you please give me a hint to what function/stream can be used for this?</p>