Me and my partner attempted this and didn't get real far with the program. We need to use strings and string functions. Also, loops. I will try to explain it and show the code we have got.
I have 2 documents named Emma and Letter. The file contained Emma has a lot of introductory material which I need to skip. Easiest way is to hunt for the string "Chapter I". Then start with file position marker on the first line. The way this works is with groups of 3 words from letter.txt. The first word says how many lines you need to move down in the text by the number of letters in the words. Second word tells you the word on that line by the number of letters in the word. Third word, use the length of the word to find the particular letter. Repeat thus until the letter or character found is a period(.). The output should be "timeisimportant"
Example, the letter.txt document starts like this:
I might be at school with you soon............
So you would use Hi, cousin and I as first, second, and third word. And use the directions for the words in Emma to find each letter. And keep repeating.
code I have so far which is not much:
i have tried other forums with not much help at all.
using namespace std;
string a, w, x, z;
a = "CHAPTER I";
inputFile.open("Emma.txt"); // opens the txt file
while (w != a)
input >> ;