help with strings...kind of tedious work I need help on.
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 >> ;
I don't understand what u mentioned here.
By Anjana Jonathan in forum Careers
Last Post: 07-03-2006, 03:15 AM
By Gary Bronson in forum Web
Last Post: 10-15-2001, 07:52 PM
By Shaheen in forum Careers
Last Post: 01-17-2001, 11:19 AM
By Jason Langston in forum Careers
Last Post: 08-08-2000, 08:37 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center