A Word List Generator - how to start?

Hello All,

I'm pretty new to C++, but have toyed with other programming languages in the past. Essentially, what I want to create is a small program which does the following:

1). Reads a .txt file containing a number of words (quite a large file).
2). Append to each word in that .txt file the number 1, then start again and append the numbers 1 and 2, then again, 1, 2 and 3.


This is where I would like to start, relatively basic, but hopefully go onto produce a program which is more diverse - can manipulate the strings, changing cases of specific letters of each word for example.

Any and all help is much appreciated, I know the basics, but really haven't a clue how to start. My assumptions are some while loop structure, reading each line of the .txt file at a time (the words will be in a list stucture, similar to a .lst file) and append what is needed.

Such like

While(lst != EoF)
Read each line
take word, ".." + "1"
etc.

Regards.
Have you think about using a database? (i am pretty new to the language but i think that's what would fit most for the quite a large file filled with words where later you would need easy access and manipulation of those strings.)
Last edited on
Topic archived. No new replies allowed.