0

here's the description:
=============================================
You are asked to develop a C++ program that reads a text ¯le given by the user (e.g. test.txt), and output
the frequency of the prepositions contained in the text ¯le on the screen. Your program shall provide a simple
interface for the user to input the name of a text ¯le and exit the program.
=============================================

I don't expect you to write the code for me, but please tell me what ur ideas are. Thanx!!!

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by Ancient Dragon
0

first, create an vector of all prepositions. (I don't know if that is a complete list, but it is a good start)

Then read the file one word at a time and search the vector created above for the word. If the word read from the file is found in the vector then do something with it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.