Actually, in C++ there's another way to read files besides simply using fopen, and it's much easier to implement than fopen: feeding the file to your C++ program through CMD. For example, say you have a program called test.exe and a text file called x.txt, and you want test.exe to read the data in x.txt and display it. You open CMD and type test.exe<x.txt, and it reads and displays the contents of x.txt. This article teaches you this way of reading files. Thanks also to a reader named Canghai, who taught me this technique.

Reading and Returning Files:

This is simple, but hard to describe in words, so I recorded a video for you to watch.

Project file download: http://goo.gl/n8W9G