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.
How can put my program as a target to piping in linux terminal?
Say I wrote a C++ program MyProg
I would like to be able to do something like
$ ls | ./MyProg
Could you please give me a hint to what function/stream can be used for this?