Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 8th, 2005, 6:31 AM   #1
allen1984us
Newbie
 
Join Date: Mar 2005
Posts: 3
Rep Power: 0 allen1984us is on a distinguished road
how to implemen the Find funtion in the text editor to locate a word in a document???

an object oriented C++ set of classes and use them to reproduce the similar function as find function in text editor like " notepad or Word"

the program should have the ability to read a text file and store the texts in a hash table.

should keep track the location of each word in the reading process before place the word in the hash table

The program should have the ability to list out the location of the target word, in this case, the line and column number of the first letter of the target word. Besides, it also informs the word position in the line. If there are multiple entries of a target word, you should list out the location of all of them.

anyone can help me for completing this program?

Last edited by allen1984us; Mar 8th, 2005 at 6:34 AM.
allen1984us is offline   Reply With Quote
Old Mar 8th, 2005, 7:09 AM   #2
Dizzutch
Professional Programmer
 
Dizzutch's Avatar
 
Join Date: Dec 2004
Location: Worcester, MA
Posts: 441
Rep Power: 4 Dizzutch is on a distinguished road
Send a message via ICQ to Dizzutch Send a message via AIM to Dizzutch Send a message via MSN to Dizzutch Send a message via Yahoo to Dizzutch
did ya try anything yet? Unfortunately we don't really do people's homework for them. Show us what ya got and if you run into problems we can help you out. But yes, all this is very possible in C++.
__________________
naked pictures of you | PFO F@H stats
Dizzutch is offline   Reply With Quote
Old Mar 8th, 2005, 8:17 AM   #3
allen1984us
Newbie
 
Join Date: Mar 2005
Posts: 3
Rep Power: 0 allen1984us is on a distinguished road
i don't howto read the text file and place it into the hash table ...is that any possible solution to fix it ?
allen1984us is offline   Reply With Quote
Old Mar 8th, 2005, 9:05 AM   #4
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Divide and conquer... start by reading data from a file.

Try this link: http://www.cplusplus.com/doc/tutorial/tut6-1.html

-Read and Output the file to the screen.
-Create hash table
-Instead of writing it to the screen, write it to the hash table.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Mar 8th, 2005, 10:32 AM   #5
allen1984us
Newbie
 
Join Date: Mar 2005
Posts: 3
Rep Power: 0 allen1984us is on a distinguished road
thnanks a lot ...i will try it 1st..
allen1984us is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC