Please can anybody help me? I'm a beginner .
I need to write a c++ program that does the following :
1. Ask the user to enter two text file , the the first one contains a list of words in one column Regardless of their number , second one contains the text file ,like this:
//output
Enter the keywords file: keywords_file.txt
Enter the text file: text_file.txt
2.Search for the keywords from the keywords file in the text file
3.if the keyword exist the output =1 "true", if the keyword doesn't exist output =0 "false" ,like this :
system : 1 //its exist
book : 0 //its doesn't exist
4. Then output in new text file (ofstream)
I put the words in file each one on its own line because some of them are phrases I don't want to sprit them ,search them as one word , also the test file I want it to stay as complete text not separate words from each other so possibly I cant use "map" & "vector". I already tried them...so possibly I can consider that each word in the words file just a line and read them all , then search for them in the text file
Haneen_1
0
Newbie Poster
Recommended Answers
Jump to PostThis needs more definition. I think you meant "split" where you wrote "sprit." If I guessed wrong then I will be wrong here.
- I will not attempt to write your code for you. This is your assignment, not mine.
- You need to define that "split" carefully. Examples:
a. "This …
All 2 Replies
rproffitt
2,580
"Nothing to see here."
Moderator
Haneen_1
commented:
yes , its split ,i will try with its , if i faced any problem will you help me?
+0
rproffitt
2,580
"Nothing to see here."
Moderator
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.