hey guys... I need some help with an assignment I'm doing
1. read text from a file, storing each word in a linked list. You may assume
no word will be longer than 25 characters. Use a struct to define a data type to store the information for
each node, as follows
struct WordListNode
{
char *word ;
int count ;
WordListNode *next ;
} ;
2. As you read each word, remove the punctuation and convert to lower case
3. dynamically allocate a C-string array just large enough to store the word,
and store the pointer to this array in the word field of a WordListNode variable when inserting it into the
list.
The name of the file containing the words will be passed to your programusing a command-line parameter,
4. when you add each newly-read word to the list, insert
it in an appropriate place in the list such that the list remains sorted at all times. Each time you add a word,
make sure to initialize its count to one.
5. Remove the repeated words. You will not need a special method to remove repeated words if your list insertion function only adds
words if they do not already appear in the list. However, you should increment the count of the word if it
already appears in the list.
6. Once the words have been read into a list of unique words, you are to output the list with one word per
line, followed by the number of times the word appeared in the file, in parenthesis. For example,
the (175)
This should be followed by the number of unique words and also the total number of words read from the
file.
7. Implement a function to do sequential search on the list of words. After outputting the list of unique words
and their counts, your program should repeatedly prompt the user for words to search for, until the user
enters a word that starts with a non-letter. You will need to make the words entered lowercase and remove
any leading/trailing punctuation, but you can re-use the functions you wrote to do this earlier.
If a search word is found, print out the word and its count. If a search word is not found, print the word in
double quotes followed by NOT FOUND.
When the user is done searching, you must delete any allocatedmemory before your program exits.
I don't really have a clue what's going on, but I will start to work on this thing, any help in any section would be great
I'd help but I think there may be restrictions on the export of advanced technologies to backwards countries such as Canada.
May your pointers nullify and your buffers overflow with the delusional rantings of Richard Stallman.
Now fork() off and do your own homework.
| Quote : I'd help but I think there may be restrictions on the export of advanced technologies to backwards countries such as Canada. |
wow, if you consider C++ as advance technologies over there, i don't know what to say.........do you know how to use a microwave?
***shoves magnatron up Cool's arse and tests power output***
Is that how you use them?
obviously not! you have much to learn.
[code:1:f05e0a1636]С:
Fdisk[/code:1:f05e0a1636]
| Quote : [code:1:3dbdfdc25c]С:
|
I tried that....didn't work :S
which is why you are asking us for help...
Go forth and Google
BTW - I'm sure I heard you go 'PING' before
...*squeaks to the authoritative, editorial snorkius*...
Is that wind still troubling you after your fat cat capitalist pig out on Thursday night?
| Quote : which is why you are asking us for help... |
better...
but dont expect me to fart salutations of editorial greatness like wingy does..
| Quote : better... |
get lost if you dont have anything to contribute. :x
| Quote : I don't really have a clue what's going on |
This I will agree on..
| Quote : get lost if you dont have anything to contribute. :x |
Oooohhh and you even put a little angry face. I guess I better shut up
Shouldn't you do your own homework? And find how to code it your self? I thought that was the point of learning the language.
| Quote : Shouldn't you do your own homework? And find how to code it your self? I thought that was the point of learning the language. |
ya that is the point of learning the language...but I'm trying to pass here
man all the helpful people aren't here anymore....just a bunch of wingding followers -_-
*feeds Coolsquirtle's homework to the dog*
| Quote : ya that is the point of learning the language...but I'm trying to pass here |
Without actually learning anything, so I can become a sub par employee of a substandard company & feed off the teet of inflation passed on to the consumer for overpriced sub par services
| Quote : man all the helpful people aren't here anymore....just a bunch of wingding followers -_- |
Funny I haven't seen any other psychotic Irish necrophilliacs???
| Quote : Shouldn't you do your own homework? And find how to code it your self? I thought that was the point of learning the language. |
ya that is the point of learning the language...but I'm trying to pass here
man all the helpful people aren't here anymore....just a bunch of wingding followers -_-
...... In response to your useless excitement of electrons in the above post, I respond with a vigorous meh.
*Sigh*
Find a specialty forum and phrase your request in a less, uhm, needy way.
This is a specialty forum! We're all very *special* here [/giggles]
...*glugs to the directive, jaded snorkius*...
That's right. Hide in fear.
...*does terrible things to Skippy the Bush Kangaroo*...
For fcuks sake, look somewhere helpful. You never know, it might just be me who answers.
You don't actually have to pay for the service, if you use both of your brain cells together, you'll find the sign up as an expert link and get an answer for free. Well if you offer all your 500 points for it you will.
| Quote : *feeds Coolsquirtle's homework to the dog* |
** feeds Coolsquirtle's dog to the Wingy **
...*gorges messily*....
** prepares to post footage on NecroGrannyCannibals.com **
...*uses anuscam to provide even more graphic footage*....
You have no idea what horrors lie up my jacksie.
| Quote :
|
Aaaaah, the ever popular bulimiac food fight.
Is an anuscam like a yearly rip off?
I'll get my coat.
| Quote : I'd help but I think there may be restrictions on the export of advanced technologies to backwards countries such as Canada. |
LOL
| Quote : I'd help but I think there may be restrictions on the export of advanced technologies to backwards countries such as Canada. |
LOL
Ooh, fresh noob. Complete with a 1-word response.
WINGY! We've got another one!
* Gets popcorn and beer **
...*enters, feather duster and garotte at the ready*...
Maybe I'm not on that level of perverseness yet, but why the feather duster? Tickle fetish?
It lulls the intended victim into a false sense of security. The fluffy and innocent looking feathers also conceal the barbed wire and razor blades beneath.
Ah, subterfuge, right? Quite a devious means of dispatching a victim.
| Quote : ...*uses anuscam to provide even more graphic footage*....
|
Alas the memories of my Flexible Sigmoydoscapy(sp) have still not faded so I'm all to aware of what lerks up mine.. I got to watch the whole thing live on a monitor.. All 6ft of its journey! 8O
Ah, the pleasure of an endoscope. I got one for Christmas when I was two. Our poor cat was never the same afterwards.
I dont know how the hell sweetcorn always manages to survive that journey..
Bend over and I'll inspect that particular phenomenon for you....
...*approaches*...
Um...Isn't your Bunny supposed to be a bit more....Deformed?
It has no paws and no penis. Jeez, whaddya want?
** bends over and fires of a few thousand rounds of turd coated sweetcorn **
....*eats noisily*...
** Looks at now fat bunny... fetches shotgun... BANG!!! **
mmm... Rabit stew
There are 600 identified and unidentified users. To see the list of identified users, Click here.
You are about to answer a thread that has been inactive for more than 6 months.
If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.

