| | |
help with text editing
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2008
Posts: 1
Reputation:
Solved Threads: 0
Problem 1a: Write a program that generate random text as follows:
the uses chooses a max number of words
it reads in a text file
chooses a random word
it prints the random word
it then finds the next instance of that word in the file
it selects the word following the word it just found
it prints this word
if find reaches the end of the document it starts at the beginning again.
The program will terminate if it loops all the way around and lands on the same place.
The program terminates if it generates the max number of words.
Problem 1b: Try the above but after generating the first two words, it must match
sequences of two words rather than just one.
the uses chooses a max number of words
it reads in a text file
chooses a random word
it prints the random word
it then finds the next instance of that word in the file
it selects the word following the word it just found
it prints this word
if find reaches the end of the document it starts at the beginning again.
The program will terminate if it loops all the way around and lands on the same place.
The program terminates if it generates the max number of words.
Problem 1b: Try the above but after generating the first two words, it must match
sequences of two words rather than just one.
![]() |
Similar Threads
- Help in Creating a Forum (Web Hosting Deals)
- Editing boot.ini (Windows NT / 2000 / XP)
- Searching for software with scanning, text/graphic editing, etc. functions (*nix Software)
- spybot german error message (Viruses, Spyware and other Nasties)
- Error when editing PHP lines in a theme file. (PHP)
- Set Accessibility Features for People Who are Blind or Who Have Low Vision in WinXP (Windows tips 'n' tweaks)
- Notepad VS. Something Else (Java)
Other Threads in the C++ Forum
- Previous Thread: Have problem using size_t type...
- Next Thread: What are the results for this?
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class code coding compile compiler console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib linkedlist linker list loop looping loops map math memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference rpg sorting string strings temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets






