Does anyone know how I would set up my program to allow a text file to be piped into my compiled code?

it should work by issuing a command similar to the one below
cat file.rle | ./code

thanks