How to print file on command line?

I tried thiat example
http://www.cplusplus.com/reference/clibrary/cstdio/fread/
but it dont print text on screen, how I can change it to do it?
That shows how to get the file contents in a buffer, you need to print the content of that to the standard output to show it.
http://www.cplusplus.com/reference/clibrary/cstdio/printf/
http://www.cplusplus.com/reference/clibrary/cstdio/puts/
Topic archived. No new replies allowed.