Hi!

(Sorry for my bad English, but I didn’t found such a good forum in German like this!)

I’m a beginner in C-programming and now I should write my first little program. Now I want to explain a part of my task, where I can’t find a solution on my own.
I have to open a simple text-file and to analyze it. My program should identify different words and they have to been added to a structure like this:

Code:
struct list {
       char word[26];
       int quantity;
};
So I have to create a big algorithm with lots of while-, if- and for-loops, haven’t I?
At this moment I have a simple working menu and I can also open a txt-file without problems. But now I haven’t any idea how I can get the different words in my structure and to print them out. Maybe I can’t remember the commands, but also Google couldn’t help me.

I would be deeply grateful if someone could help me or give me some advises or tips!

Kind regards
Fresa


PS: These are the next steps: - to count the quantity of the different words
- to arrange them alphabetically or to arrange them to their quantity