nevermind

Could you post an example lib_input.txt so that we know what "blanks and prompts" looks like.

You have many lines of hardcoded stuff. You should not: the program should operate on the input, whatever it is.

You have global variables. Try to write the program without them. Rather pass parameters to functions and return value, if necessary.
The lib_input file consists of “pairs” of lines, a line of straight text to write to the mylib file followed by a line with the appropriate user prompt. So you may want to construct a loop that reads two lines at a time, doing the appropriate action with each line.

Doesn't that essentially say:
REPEAT
  Read two lines, "text" and "prompt"
  Show "prompt"
  Read user's "answer"
  Append "text" and "answer" to story


Programming has two parts, what and how. The above is an idea for what to do.
Then there is the how to write that idea in C++.
The what is more abstract, but it depends somewhat on how particular language can do things.
Topic archived. No new replies allowed.