Actually book isn't wrong, but it's not clear either.
You can pass arguments to program(if you're linux user, you're used to it; if not, then I hope that book explained how it works)
This way, you don't need to open program in console and then provide input; you give input with program call. For example, in linux, you have a function:
cp [SOURCE] [DIRECTORY]
You can use this command in your terminal: you simply type in cp and provide arguments, and function(program) will be called with proper arguments. You don't waste time nor space for asking questions("Please, tell me the name of file you would like to copy").
This way, you can simply copy files, like this:
cp main.cpp bin/
//it means: copy main.cpp to folder bin
The book wants you to do the same with the program: it says that you can call its name(and the suggested name is readfile2), and then provide input.
Also, the "error" that you found isn't really an error. The string is true.
I tried to make it at least a bit more clear. If I failed, you may want to look at this thread:
http://www.cplusplus.com/forum/beginner/5404/
Duoas, experienced user, showed how to use program the way your book wants you to use it.
CHeers!